x-generator: NSwag v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))
swagger: '2.0'
info:
  title: Absorb Integration API
  version: v2
consumes:
  - application/json
produces:
  - application/json
paths:
  /prerequisites:
    get:
      tags:
        - Prerequisites
      summary: List prerequisites.
      operationId: Prerequisites_GetPrerequisites
      parameters:
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/PrerequisiteResource'
      security:
        - api_key: []
  /prerequisites/{id}:
    get:
      tags:
        - Prerequisites
      summary: Get prerequisite.
      operationId: Prerequisites_GetPrerequisite
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The prerequisite ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/PrerequisiteResource'
        '404':
          x-nullable: false
          description: Prerequisite not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /course/{courseId}/prerequisites:
    get:
      tags:
        - Prerequisites
      summary: List prerequisites for a specific course.
      operationId: Prerequisites_GetCoursePrerequisite
      parameters:
        - type: string
          name: courseId
          in: path
          required: true
          description: The course ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/PrerequisiteResource'
        '404':
          x-nullable: false
          description: Course not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  PrerequisiteResource:
    type: object
    description: Represents information about prerequisites in the Integration API.
    properties:
      id:
        type: string
        description: The unique prerequisite identifier.
        format: guid
      name:
        type: string
        description: The prerequisite's name.
      requiredNumber:
        type: integer
        description: The number of courses/competencies needed to satisfy the prerequisite.
        format: int32
      prerequisiteType:
        description: >-
          The prerequisite's type.


          Possible Enum Values: `0 = Courses` `1 = Certificates` `2 =
          Competencies` 
        allOf:
          - $ref: '#/definitions/PrerequisiteType'
      courseIds:
        type: array
        description: The prerequisite's list of course IDs, if any.
        items:
          type: string
          format: guid
      competencyDefinitionIds:
        type: array
        description: The prerequisite's list of competency definition IDs, if any.
        items:
          type: string
          format: guid
  Link:
    type: object
    properties:
      Rel:
        $ref: '#/definitions/Relation'
      Items:
        type: array
        items:
          $ref: '#/definitions/LinkItem'
  Relation:
    type: object
    properties:
      Name:
        type: string
  LinkItem:
    type: object
    properties:
      Href:
        type: string
      Name:
        type: string
      Templated:
        type: boolean
      Type:
        type: string
      Deprecation:
        type: string
      Profile:
        type: string
      Title:
        type: string
      Hreflang:
        type: string
  IEmbeddedResource:
    type: object
    x-abstract: true
    properties:
      Name:
        type: string
      Resources:
        type: array
        items:
          $ref: '#/definitions/IResource'
  IResource:
    type: object
    x-abstract: true
    properties:
      Links:
        type: array
        items:
          $ref: '#/definitions/Link'
      EmbeddedResources:
        type: array
        items:
          $ref: '#/definitions/IEmbeddedResource'
  PrerequisiteType:
    type: integer
    description: The type of prerequisite.
    x-enumNames:
      - Courses
      - Certificates
      - Competencies
    enum:
      - 0
      - 1
      - 2
  GenericErrorResponse:
    type: object
    description: |-
      This class is NOT to be used as an actual response. This is to be used as
      the return type for non-200 responses in `SwaggerResponse` attributes.
    properties:
      validations:
        type: array
        description: The validations (if any) which caused the error.
        items:
          type: string
      code:
        description: The status code returned.
        allOf:
          - $ref: '#/definitions/HttpStatusCode'
      message:
        type: string
        description: The error message.
      term:
        type: string
        description: The general error term.
      _meta:
        type: object
        description: 'A list of meta data (if any). '
        additionalProperties:
          type: string
  HttpStatusCode:
    type: integer
    description: ''
    x-enumNames:
      - Continue
      - SwitchingProtocols
      - OK
      - Created
      - Accepted
      - NonAuthoritativeInformation
      - NoContent
      - ResetContent
      - PartialContent
      - MultipleChoices
      - Ambiguous
      - MovedPermanently
      - Moved
      - Found
      - Redirect
      - SeeOther
      - RedirectMethod
      - NotModified
      - UseProxy
      - Unused
      - TemporaryRedirect
      - RedirectKeepVerb
      - BadRequest
      - Unauthorized
      - PaymentRequired
      - Forbidden
      - NotFound
      - MethodNotAllowed
      - NotAcceptable
      - ProxyAuthenticationRequired
      - RequestTimeout
      - Conflict
      - Gone
      - LengthRequired
      - PreconditionFailed
      - RequestEntityTooLarge
      - RequestUriTooLong
      - UnsupportedMediaType
      - RequestedRangeNotSatisfiable
      - ExpectationFailed
      - UpgradeRequired
      - InternalServerError
      - NotImplemented
      - BadGateway
      - ServiceUnavailable
      - GatewayTimeout
      - HttpVersionNotSupported
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Prerequisites
x-servers:
  - url: https://rest.myabsorb.com
    description: US
  - url: https://rest.myabsorb.ca
    description: CA
  - url: https://rest.myabsorb.eu
    description: EU
  - url: https://rest.myabsorb.com.au
    description: AU
