{"openapi":"3.1.0","info":{"title":"SKILL LMS Read API","version":"1.0.0","description":"API en lecture seule. L’organisme est dérivé du compte OAuth. Chaque intégration doit utiliser un client OAuth pré-enregistré et explicitement autorisé par SKILL LMS."},"servers":[{"url":"https://mcp.skill-lms.fr"}],"security":[{"OAuthAuthorizationCode":["read"]}],"paths":{"/api/v1/organization":{"get":{"operationId":"getOrganization","summary":"Consulter l’organisme autorisé","responses":{"200":{"description":"Lecture réussie.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Organization"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}}}}},"400":{"description":"Paramètres invalides.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Jeton OAuth absent, invalide ou expiré.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Client OAuth non autorisé, compte inactif ou compte sans responsabilité sur l’organisme.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organisme introuvable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Limite de débit atteinte.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Donnée temporairement indisponible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses":{"get":{"operationId":"listCourses","summary":"Lister les formations détenues par l’organisme","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}}],"responses":{"200":{"description":"Lecture réussie.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Course"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}},"400":{"description":"Paramètres invalides.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Jeton OAuth absent, invalide ou expiré.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Client OAuth non autorisé, compte inactif ou compte sans responsabilité sur l’organisme.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Limite de débit atteinte.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Donnée temporairement indisponible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learners":{"get":{"operationId":"listLearners","summary":"Lister les apprenants de l’organisme","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}}],"responses":{"200":{"description":"Lecture réussie.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Learner"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}},"400":{"description":"Paramètres invalides.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Jeton OAuth absent, invalide ou expiré.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Client OAuth non autorisé, compte inactif ou compte sans responsabilité sur l’organisme.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Limite de débit atteinte.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Donnée temporairement indisponible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/enrollments":{"get":{"operationId":"listEnrollments","summary":"Lister les inscriptions des apprenants de l’organisme","description":"Inclut les inscriptions aux formations détenues par l’organisme et aux formations partagées avec lui.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}},{"name":"course_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Lecture réussie.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Enrollment"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}},"400":{"description":"Paramètres invalides.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Jeton OAuth absent, invalide ou expiré.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Client OAuth non autorisé, compte inactif ou compte sans responsabilité sur l’organisme.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Limite de débit atteinte.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Donnée temporairement indisponible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"OAuthAuthorizationCode":{"type":"oauth2","description":"OAuth 2.1 Authorization Code avec PKCE S256 et scope read. Client confidentiel : HTTP Basic (Client ID:secret) pour échanger le code et renouveler les jetons. Le client doit être actif dans les intégrations API de l’organisme SKILL LMS.","flows":{"authorizationCode":{"authorizationUrl":"https://mcp.skill-lms.fr/oauth/read-api/authorize","tokenUrl":"https://mcp.skill-lms.fr/oauth/read-api/token","scopes":{"read":"Lire les formations, apprenants, inscriptions et informations de l’organisme autorisé."}}}}},"schemas":{"Organization":{"type":"object","required":["id","name","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"catalog_slug":{"type":["string","null"]},"catalog_enabled":{"type":["boolean","null"]}},"additionalProperties":false},"Course":{"type":"object","required":["id","title","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"is_published":{"type":["boolean","null"]},"duration_hours":{"type":["number","null"]},"modality":{"type":["string","null"]},"thumbnail_url":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"Learner":{"type":"object","required":["id","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":["string","null"],"format":"email"},"full_name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"Enrollment":{"type":"object","required":["id","course_id","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"student_id":{"type":["string","null"],"format":"uuid"},"course_id":{"type":"string","format":"uuid"},"progress":{"type":["number","null"],"minimum":0,"maximum":100},"enrollment_source":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"additionalProperties":false},"ResponseMeta":{"type":"object","required":["request_id","returned"],"properties":{"request_id":{"type":"string","format":"uuid"},"returned":{"type":"integer","minimum":0}},"additionalProperties":false},"PaginationMeta":{"type":"object","required":["request_id","returned","limit","offset"],"properties":{"request_id":{"type":"string","format":"uuid"},"returned":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0}},"additionalProperties":false},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"meta":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"}}}}}}}}