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 number for pagination
-
Number of results per page
-
Whether to include relations
-
Start date for date range filter
-
End date for date range filter
GET
/data/time-spents/
curl
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)
Array-1
[
{}
]
{
"data": [
{}
],
"total": 100,
"nb_pages": 2,
"limit": 50,
"offset": 0,
"page": 1
}