mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-25 16:41:41 +00:00
82 lines
2.2 KiB
JSON
82 lines
2.2 KiB
JSON
{
|
|
"endpoint": "/api/sync/garmin/activities",
|
|
"method": "POST",
|
|
"description": "Triggers synchronization of Garmin Connect activities to CentralDB.",
|
|
"request": {
|
|
"headers": {
|
|
"Authorization": "Bearer <token>"
|
|
},
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"start_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional start date to sync activities from (YYYY-MM-DD). Defaults to last sync date."
|
|
},
|
|
"end_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional end date to sync activities until (YYYY-MM-DD). Defaults to today."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"response": {
|
|
"202": {
|
|
"description": "Synchronization process initiated successfully.",
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Garmin activity synchronization initiated."
|
|
},
|
|
"sync_job_id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "ID of the created synchronization job."
|
|
}
|
|
},
|
|
"required": ["message", "sync_job_id"]
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized: User not authenticated or Garmin Connect account not linked.",
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "string",
|
|
"example": "Not authenticated or Garmin Connect account not linked."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too Many Requests: Rate limit exceeded for Garmin Connect API.",
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "string",
|
|
"example": "Rate limit exceeded. Please try again later."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error: Unexpected error during synchronization initiation.",
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "string",
|
|
"example": "An unexpected error occurred."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |