openapi: 3.2.0 info: description: API to manage CoorpAcademy content version: 2.276.0 title: Content Certifications API servers: - url: /api/v2 - url: http://localhost:3700/api/v2 - url: https://content-staging.coorpacademy.com/api/v2 - url: https://content.coorpacademy.com/api/v2 host: content.coorpacademy.com tags: - name: certifications paths: /repository/{repository}/certifications/{ref}: get: tags: - certifications summary: find one certification snapshot description: get one certification snapshot by its ref & repository operationId: findOneCertification security: - token: [] x-exegesis-controller: certifications parameters: - name: repository in: path description: Ref of the repository required: true schema: type: string example: content-core@cockpitRecette-core - name: ref in: path description: Reference of the certification required: true schema: type: string example: certif_01 responses: '200': description: Certification matching the given conditions content: application/json: schema: $ref: '#/components/schemas/CertificationSnapshot' '400': description: Given data on body request does not match with model definition content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: User not identified by the server. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Requested certification does not exist. content: application/json: schema: $ref: '#/components/schemas/Error' /repository/{repository}/certifications/upsert: post: tags: - certifications summary: create a certification diff and upsert a snapshot description: create a certification diff and upsert a snapshot operationId: upsertCertification security: - token: [] x-exegesis-controller: certifications requestBody: description: partial certification required: true content: application/json: schema: $ref: '#/components/schemas/CertificationDiff' parameters: - name: repository in: path description: Ref of the repository required: true schema: type: string example: content-core@cockpitRecette-core responses: '201': description: certification snapshot content: application/json: schema: $ref: '#/components/schemas/CertificationDiff' '400': description: Given data on body request does not match with model definition content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: User not identified by the server. content: application/json: schema: $ref: '#/components/schemas/Error' /repository/{repository}/certifications: get: tags: - certifications summary: Get a list of certifications snapshot description: Get a list of certifications snapshot operationId: findCertifications security: - token: [] x-exegesis-controller: certifications parameters: - name: repository in: path description: Ref of the repository required: true schema: type: string example: content-core@cockpitRecette-core - name: refs in: query schema: type: string description: list of certifications references, separated by comma responses: '200': description: Certifications found content: application/json: schema: type: array items: $ref: '#/components/schemas/CertificationSnapshot' '401': description: User not identified by the server. content: application/json: schema: $ref: '#/components/schemas/Error' /repository/{repository}/certifications/{ref}/undo: put: tags: - certifications summary: Revert modification since the last publish description: Revert modification since the last publish operationId: undoCertificationChange security: - token: [] x-exegesis-controller: certifications requestBody: description: partial certification required: true content: application/json: schema: type: object example: meta: modifiedBy: userId parameters: - name: repository in: path description: Ref of the repository required: true schema: type: string example: content-core@cockpitRecette-core - name: ref in: path description: Reference of the certification required: true schema: type: string example: cert_kIIm6bPa00 responses: '200': description: certification matching the given conditions content: application/json: schema: $ref: '#/components/schemas/CertificationEdition' '400': description: Given data on body request does not match with model definition content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: User not identified by the server. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Requested certification does not exist. content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: CertificationStructureEdition: type: object properties: title: type: string description: type: string condition: $ref: '#/components/schemas/CertificationCondition' rewards: $ref: '#/components/schemas/CertificationRewards' defaultLocale: type: string groups: type: array items: type: string populations: type: array items: type: string svg: type: string updated: type: boolean CertificationConditionItemsDecoder: type: object properties: type: type: string engine: type: string ref: type: string StarsRewards: type: - 'null' - object required: - value - groups properties: value: type: number groups: type: array items: type: string CertificationSnapshot: type: object required: - ref - repository - version - meta - state - structure properties: repository: type: string ref: type: string version: type: number locales: type: object additionalProperties: $ref: '#/components/schemas/CertificationLocales' meta: $ref: '#/components/schemas/CertificationMeta' state: type: string structure: $ref: '#/components/schemas/CertificationStructureSnapshot' CertificationStructureSnapshot: type: object required: - title properties: title: type: string description: type: string defaultLocale: type: string condition: $ref: '#/components/schemas/CertificationCondition' rewards: $ref: '#/components/schemas/CertificationRewards' groups: type: array items: type: string populations: type: array items: type: string svg: type: string updated: type: boolean CertificationEdition: type: object required: - ref - repository - version - meta properties: repository: type: string ref: type: string version: type: number locales: additionalProperties: $ref: '#/components/schemas/CertificationLocales' meta: $ref: '#/components/schemas/CertificationMeta' state: type: string structure: $ref: '#/components/schemas/CertificationStructureEdition' example: ref: cert_kIIm6bPa00 repository: content-core@cockpitRecette-core version: 1 meta: createdAt: '2016-02-09T10:31:57.702Z' updatedAt: '2019-12-13T10:50:42.668Z' modifiedBy: silouone createdBy: stefano structure: title: title description: description populations: - pop1 - pop2 defaultLocale: en locales: en: title: title description: description fr: title: title description: description es: title: title description: description CertificationRewards: type: object properties: diploma: $ref: '#/components/schemas/DiplomaRewards' resource: $ref: '#/components/schemas/ResourceRewards' stars: $ref: '#/components/schemas/StarsRewards' DiplomaRewards: type: - 'null' - object properties: logo_url: type: - string - 'null' signature_url: type: - string - 'null' ResourceRewards: type: - 'null' - object required: - label - file_uri properties: label: type: string file_uri: type: string Error: type: object properties: id: type: string code: type: string errors: type: array items: type: object success: type: boolean status: type: integer format: int32 message: type: string CertificationStructureDiff: type: object properties: title: type: string description: type: string condition: $ref: '#/components/schemas/CertificationCondition' rewards: $ref: '#/components/schemas/CertificationRewards' groups: type: array items: type: string populations: type: array items: type: string svg: type: - string - 'null' updated: type: boolean CertificationLocales: type: object properties: title: type: - string - 'null' description: type: - string - 'null' rewards: type: object properties: diploma: type: object properties: signature_url: type: string logo_url: type: string resource: type: object properties: label: type: string file_uri: type: string stars: type: object properties: value: type: number groups: type: array items: type: string CertificationCondition: type: object properties: type: type: string items: type: object properties: ref: $ref: '#/components/schemas/CertificationConditionItemsDecoder' nbDone: type: number badge: type: string level: type: string CertificationDiff: type: object required: - ref - repository - version - meta properties: repository: type: string ref: type: string version: type: number locales: type: object additionalProperties: $ref: '#/components/schemas/CertificationLocales' meta: $ref: '#/components/schemas/CertificationMeta' state: type: string structure: $ref: '#/components/schemas/CertificationStructureDiff' CertificationMeta: type: object required: - modifiedBy properties: createdAt: type: string updatedAt: type: string modifiedBy: type: string createdBy: type: string securitySchemes: token: type: apiKey name: authorization in: header