mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-25 16:41:41 +00:00
feat: Initial commit of FitTrack_GarminSync project
This commit is contained in:
90
contracts/sync_garmin_workouts.json
Normal file
90
contracts/sync_garmin_workouts.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"endpoint": "/api/sync/garmin/workouts",
|
||||
"method": "POST",
|
||||
"description": "Uploads a workout from the application to Garmin Connect.",
|
||||
"request": {
|
||||
"headers": {
|
||||
"Authorization": "Bearer <token>"
|
||||
},
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workout_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The ID of the workout to upload from CentralDB."
|
||||
}
|
||||
},
|
||||
"required": ["workout_id"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"202": {
|
||||
"description": "Workout upload process initiated successfully.",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Garmin workout upload initiated."
|
||||
},
|
||||
"sync_job_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "ID of the created synchronization job for the workout upload."
|
||||
}
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found: Workout with the specified ID not found.",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"detail": {
|
||||
"type": "string",
|
||||
"example": "Workout not found."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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 workout upload initiation.",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"detail": {
|
||||
"type": "string",
|
||||
"example": "An unexpected error occurred during workout upload."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user