GET /data/time-spents/

Retrieve all time spent records. Supports filtering via query parameters and pagination. Supports date range filtering with start_date and end_date.

Query parameters

  • page integer

    Page number for pagination

  • limit integer

    Number of results per page

  • relations boolean

    Whether to include relations

  • start_date string(date)

    Start date for date range filter

  • end_date string(date)

    End date for date range filter

Responses

  • 200 application/json

    Time spent records retrieved successfully

    One of:
  • 400

    Invalid filter format or query error

GET /data/time-spents/
curl -X GET "http://api.example.com/data/time-spents/?page=1&limit=50&relations=false&start_date=2024-01-01&end_date=2024-01-31" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

url = "http://api.example.com/data/time-spents/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
params = {
    "page": 1,
    "limit": 50,
    "relations": false,
    "start_date": "2024-01-01",
    "end_date": "2024-01-31"
}
payload = None

response = requests.get(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request GET 'http://api.example.com/data/time-spents/' \
 --header "Authorization: $API_KEY"
Response examples (200)
[
  {}
]
{
  "data": [
    {}
  ],
  "total": 100,
  "nb_pages": 2,
  "limit": 50,
  "offset": 0,
  "page": 1
}