Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/coding/getcodingprojects

# Top projects

GET `https://api.rewind.rest/v1/coding/projects`

Per-project coding time (WakaTime durations) with a matching GitHub commit count (commits whose repo ends with /{project}). When a date/from/to filter is given, both the coding time and the commit count are scoped to that window (commits by committed\_at). Supports limit (default 10, max 50).

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Query Parameters

#### limit (query, integer)

#### date (query, string)

Single day (YYYY-MM-DD). Overrides from/to.

#### from (query, string)

Range start, inclusive (ISO 8601)

#### to (query, string)

Range end, inclusive (ISO 8601)

## Response

#### 200

Top projects

#### data (array of object, required)

#### properties

#### project (string, required)

#### total\_seconds (number, required)

#### commits (number, required)

#### 400

Bad request

#### error (string, required)

#### status (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X GET 'https://api.rewind.rest/v1/coding/projects' \
  -H 'Authorization: Bearer <token>'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/coding/projects', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <token>',
  },
});
const data = await res.json();
```

```python Python
import requests

res = requests.get(
    'https://api.rewind.rest/v1/coding/projects',
    headers={'Authorization': 'Bearer <token>'}
)
data = res.json()
```

#### Response

```json 200
{
  "data": [
    {
      "project": "string",
      "total_seconds": 0,
      "commits": 0
    }
  ]
}
```

```json 400
{
  "error": "Not found",
  "status": 404
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```
