mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 09:01:53 +00:00
feat: Initial commit of FitTrack_GarminSync project
This commit is contained in:
82
contracts/sync_garmin_activities.json
Normal file
82
contracts/sync_garmin_activities.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"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."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user