/api/v1/focus/sessionsRequires read scope with session_or_bearer authentication.
Parameters
| Param | Type | Required | Description | Options |
|---|---|---|---|---|
| from | string (date) | No | Input value for this endpoint. | - |
| to | string (date) | No | Input value for this endpoint. | - |
| timeField | string | No | Timestamp used for from/to range filtering. Default: createdAt. | createdAt, startedAt, completedAt |
| type | string | No | Domain category/type of the item. | FOCUS, SHORT_BREAK, LONG_BREAK, LUNCH_BREAK (repeatable or comma-separated) |
| interrupted | string | No | Input value for this endpoint. | true, false |
| completed | string | No | Filter by completedAt presence (true = completed, false = not completed). | true, false |
| page | number | No | Page number for paginated results. | - |
| pageSize | number | No | Number of items returned per page. | - |
| sortField | string | No | Field used to sort results. | createdAt, startedAt, completedAt, type, duration, interrupted |
| sortDirection | string | No | Sort order direction. | asc, desc |
Request Example
Use the snippet below to call this endpoint from your app or CLI.
Response Example
Toggle between a success and failure payload returned by this endpoint.