mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-02-15 19:56:22 +00:00
feat: Initial commit of FitTrack_GarminSync project
This commit is contained in:
82
contracts/sync_garmin_health_metrics.json
Normal file
82
contracts/sync_garmin_health_metrics.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"endpoint": "/api/sync/garmin/health-metrics",
|
||||
"method": "POST",
|
||||
"description": "Triggers synchronization of Garmin Connect health metrics to CentralDB.",
|
||||
"request": {
|
||||
"headers": {
|
||||
"Authorization": "Bearer <token>"
|
||||
},
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start_date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"description": "Optional start date to sync health metrics from (YYYY-MM-DD). Defaults to last sync date."
|
||||
},
|
||||
"end_date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"description": "Optional end date to sync health metrics 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 health metrics 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