Files
sstent 28ab4f3416 Complete implementation planning for CLI app with MFA
- Created implementation plan with technical context
- Developed data models for User Session, Sync Job, and Authentication Token
- Defined API contracts for authentication, sync triggering, and status checking
- Created quickstart guide for CLI usage
- Updated agent context with new technology stack
- Verified constitution compliance for all design decisions
2025-12-18 13:50:51 -08:00

185 lines
6.6 KiB
YAML

openapi: 3.0.0
info:
title: GarminSync CLI Sync Status API
version: 1.0.0
description: API for checking sync job status via CLI
paths:
/api/sync/cli/status:
get:
summary: Check status of sync operations
description: Retrieves the status of current and recent sync jobs
security:
- bearerAuth: []
parameters:
- name: job_id
in: query
required: false
description: Specific job ID to check (returns all recent if not provided)
schema:
type: string
responses:
'200':
description: Sync status information retrieved successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
jobs:
type: array
items:
type: object
properties:
job_id:
type: string
description: Unique identifier for the sync job
status:
type: string
description: Current status of the sync job
enum: [pending, running, completed, failed, cancelled]
progress:
type: number
format: float
minimum: 0
maximum: 100
description: Percentage of completion (0-100)
sync_type:
type: string
enum: [activities, health, workouts]
description: Type of data being synced
created_at:
type: string
format: date-time
description: When the job was created
started_at:
type: string
format: date-time
description: When the job started executing
completed_at:
type: string
format: date-time
description: When the job completed (if completed)
total_items:
type: integer
description: Total number of items to sync
processed_items:
type: integer
description: Number of items processed so far
error_message:
type: string
description: Error details if job failed
'401':
description: Authentication required or invalid token
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: false
error:
type: string
description: Error message
/api/sync/cli/status/{job_id}:
get:
summary: Check status of a specific sync job
description: Retrieves the status of a specific sync job by ID
security:
- bearerAuth: []
parameters:
- name: job_id
in: path
required: true
description: Unique identifier of the sync job
schema:
type: string
responses:
'200':
description: Specific sync job status retrieved successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
job:
type: object
properties:
job_id:
type: string
description: Unique identifier for the sync job
status:
type: string
description: Current status of the sync job
enum: [pending, running, completed, failed, cancelled]
progress:
type: number
format: float
minimum: 0
maximum: 100
description: Percentage of completion (0-100)
sync_type:
type: string
enum: [activities, health, workouts]
description: Type of data being synced
created_at:
type: string
format: date-time
description: When the job was created
started_at:
type: string
format: date-time
description: When the job started executing
completed_at:
type: string
format: date-time
description: When the job completed (if completed)
total_items:
type: integer
description: Total number of items to sync
processed_items:
type: integer
description: Number of items processed so far
error_message:
type: string
description: Error details if job failed
'401':
description: Authentication required or invalid token
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: false
error:
type: string
description: Error message
'404':
description: Sync job not found
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: false
error:
type: string
description: Error message
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT