mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 00:51:44 +00:00
87 lines
2.9 KiB
JSON
87 lines
2.9 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "GarminSync Service API - Health Metrics Sync",
|
|
"version": "1.0.0",
|
|
"description": "API for triggering and managing Garmin Connect health metrics synchronization."
|
|
},
|
|
"paths": {
|
|
"/api/sync/garmin/health_metrics": {
|
|
"post": {
|
|
"summary": "Trigger Garmin Connect Health Metrics Synchronization",
|
|
"operationId": "triggerHealthMetricsSync",
|
|
"requestBody": {
|
|
"description": "Optional parameters to control the synchronization process.",
|
|
"required": false,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"metric_types": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "List of specific health metric types to synchronize (e.g., 'heart_rate', 'sleep'). If empty, syncs all available metrics."
|
|
},
|
|
"start_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional start date (YYYY-MM-DD) to sync metrics from."
|
|
},
|
|
"end_date": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Optional end date (YYYY-MM-DD) to sync metrics up to."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"description": "Health metrics 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"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |