Reports
The Reports API allows you to generate various reports and analytics for your time tracking data.
Time Summary Report
Get a summary of time tracked for a specific period.
GET /reports/time-summary
Query Parameters
| Parameter | Type | Description |
|---|---|---|
start_date | string | Start date (ISO 8601) |
end_date | string | End date (ISO 8601) |
project_id | string | Filter by project ID |
client_id | string | Filter by client ID |
group_by | string | Group by day, week, month, or project |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.timo.app/v1/reports/time-summary?start_date=2024-01-01&end_date=2024-01-31&group_by=day"
Example Response
{
"success": true,
"data": {
"total_time": 144000,
"total_entries": 45,
"average_daily_time": 4645,
"grouped_data": [
{
"date": "2024-01-01",
"time": 28800,
"entries": 8
}
]
}
}
Project Report
Get detailed analytics for a specific project.
GET /reports/project/{project_id}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
start_date | string | Start date (ISO 8601) |
end_date | string | End date (ISO 8601) |
include_breakdown | boolean | Include daily breakdown |
Example Response
{
"success": true,
"data": {
"project_id": "proj_123",
"project_name": "Website Redesign",
"total_time": 72000,
"total_entries": 25,
"average_session_duration": 2880,
"most_productive_day": "Tuesday",
"daily_breakdown": [
{
"date": "2024-01-01",
"time": 28800,
"entries": 8
}
]
}
}
Client Report
Get analytics for a specific client across all projects.
GET /reports/client/{client_id}
Example Response
{
"success": true,
"data": {
"client_id": "client_123",
"client_name": "Acme Corp",
"total_time": 144000,
"total_projects": 3,
"total_entries": 75,
"projects": [
{
"project_id": "proj_123",
"project_name": "Website Redesign",
"time": 72000,
"percentage": 50
}
]
}
}
Export Report
Export report data in various formats.
POST /reports/export
Request Body
{
"report_type": "time_summary",
"format": "csv",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"project_id": "proj_123"
}
Supported Formats
csv- Comma-separated valuespdf- PDF documentjson- JSON data
Example Response
{
"success": true,
"data": {
"export_id": "export_123",
"download_url": "https://api.timo.app/v1/exports/export_123/download",
"expires_at": "2024-01-02T00:00:00Z"
}
}
Dashboard Data
Get data for dashboard widgets.
GET /reports/dashboard
Query Parameters
| Parameter | Type | Description |
|---|---|---|
period | string | Time period (today, week, month, year) |
Example Response
{
"success": true,
"data": {
"total_time_today": 28800,
"total_time_this_week": 144000,
"active_projects": 5,
"top_projects": [
{
"project_id": "proj_123",
"project_name": "Website Redesign",
"time": 72000,
"percentage": 50
}
],
"weekly_trend": [
{ "day": "Monday", "time": 28800 },
{ "day": "Tuesday", "time": 36000 }
]
}
}