mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-02-14 03:12:20 +00:00
93 lines
2.8 KiB
JSON
93 lines
2.8 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Garmin Authentication API",
|
|
"version": "1.0.0",
|
|
"description": "API for authenticating with Garmin Connect and managing credentials."
|
|
},
|
|
"paths": {
|
|
"/login": {
|
|
"post": {
|
|
"summary": "Authenticate with Garmin Connect",
|
|
"description": "Allows a user to provide Garmin Connect credentials to authenticate and store tokens for the FitTrack Garmin Sync service. This endpoint is publicly accessible.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["username", "password"],
|
|
"properties": {
|
|
"username": {
|
|
"type": "string",
|
|
"format": "email",
|
|
"description": "Garmin Connect username (email address)"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"description": "Garmin Connect password"
|
|
}
|
|
},
|
|
"example": {
|
|
"username": "user@example.com",
|
|
"password": "myGarminPassword"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Garmin account linked successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Garmin account linked successfully."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authentication failed",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "string",
|
|
"example": "Invalid Garmin credentials provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "string",
|
|
"example": "An unexpected error occurred during Garmin authentication."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |