Timer Management API
Base URL
All URLs referenced in the documentation have the following base:
https://api.meetandrock.com/v1/dev
Endpoints
List Timers
Retrieve all timers for the current week
curl -X GET "https://api.meetandrock.com/v1/dev/timer?date=2024-01-15" \
-H "Authorization: Bearer YOUR_API_KEY"
Query Parameters:
- date: Optional date to get timers for that week (default: current date)
Response:
{
"data": [
{
"id": "uuid",
"task_id": "uuid",
"description": "string",
"start_date": "datetime",
"end_date": "datetime",
"duration": "HH:mm:ss",
"created_by": "uuid",
"project_id": "uuid",
"children": []
}
]
}Start Timer (Play)
Start a new timer
curl -X POST "https://api.meetandrock.com/v1/dev/timer/play" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task_id": "uuid",
"description": "Working on feature"
}'
Request Body:
- task_id (string, optional): Task ID to associate with timer
- description (string, optional): Description of the timer
- parent_id (string, optional): Parent timer ID for resuming
Response:
{
"data": {
"id": "uuid",
"task_id": "uuid",
"description": "Working on feature",
"start_date": "datetime",
"created_by": "uuid",
"project_id": "uuid"
}
}Stop Timer
Stop a running timer
curl -X POST "https://api.meetandrock.com/v1/dev/timer/:timerId/stop" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"data": {
"id": "uuid",
"task_id": "uuid",
"description": "string",
"start_date": "datetime",
"end_date": "datetime",
"duration": "HH:mm:ss"
}
}Delete Timer
Delete a timer
curl -X DELETE "https://api.meetandrock.com/v1/dev/timer/:timerId" \ -H "Authorization: Bearer YOUR_API_KEY" Response: 201 No Content
Error Responses
400 Bad Request
{
"message": "Invalid request parameters"
}
401 Unauthorized
{
"message": "Invalid or missing API key"
}
404 Not Found
{
"message": "Timer not found"
}
409 Conflict
{
"message": "Active timer already exists"
}