mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-25 16:41:41 +00:00
85 lines
2.8 KiB
JSON
85 lines
2.8 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "GarminSync Service API - Activity Sync",
|
|
"version": "1.0.0",
|
|
"description": "API for triggering and managing Garmin Connect activity synchronization."
|
|
},
|
|
"paths": {
|
|
"/api/sync/garmin/activities": {
|
|
"post": {
|
|
"summary": "Trigger Garmin Connect Activity Synchronization",
|
|
"operationId": "triggerActivitySync",
|
|
"requestBody": {
|
|
"description": "Optional parameters to control the synchronization process.",
|
|
"required": false,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force_resync": {
|
|
"type": "boolean",
|
|
"description": "If true, re-download activities even if they exist. Defaults to false.",
|
|
"default": false
|
|
},
|
|
"start_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional start date (YYYY-MM-DD) to sync activities from. If not provided, syncs recent activities."
|
|
},
|
|
"end_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional end date (YYYY-MM-DD) to sync activities up to."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"description": "Activity synchronization initiated successfully. Returns a SyncJob ID.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "Unique identifier for the initiated synchronization job."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Current status of the job (e.g., 'pending', 'in_progress')."
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Confirmation message."
|
|
}
|
|
},
|
|
"required": [
|
|
"job_id",
|
|
"status",
|
|
"message"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized. User not authenticated with Garmin Connect."
|
|
},
|
|
"500": {
|
|
"description": "Internal server error."
|
|
}
|
|
},
|
|
"tags": [
|
|
"Synchronization"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |