Timer Management API
Base URL
All URLs referenced in the documentation have the following base:
https://api.meetandrock.com/v1/dev
Endpoints
Start Timer
curl -X POST "https://api.meetandrock.com/v1/dev/timer/start" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task_id": "uuid",
"description": "string"
}'
Response:
{
"data": {
"id": "uuid",
"task_id": "uuid",
"description": "string",
"start_time": "datetime",
"status": "running"
}
}Stop Timer
curl -X POST "https://api.meetandrock.com/v1/dev/timer/stop" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timer_id": "uuid"
}'
Response:
{
"data": {
"id": "uuid",
"task_id": "uuid",
"description": "string",
"start_time": "datetime",
"end_time": "datetime",
"duration": "number",
"status": "stopped"
}
}Get Active Timer
curl -X GET "https://api.meetandrock.com/v1/dev/timer/active" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"data": {
"id": "uuid",
"task_id": "uuid",
"description": "string",
"start_time": "datetime",
"status": "running",
"task": {
"id": "uuid",
"title": "string"
}
}
}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"
}