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: v1
consumes:
  - application/json
produces:
  - application/json
paths:
  /lessons:
    get:
      tags:
        - Lessons
      summary: List lessons.
      operationId: Lessons_GetLessons
      parameters:
        - type: string
          name: _filter
          in: query
          description: >-
            One or more filter operations to be performed on the collection.

            The referenced fields must allow filtering. See the respective
            report's schema for which fields can be filtered. 
                        
            Supports most of the [OData filter
            syntax](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter).
                        
            Supported operations:
                * eq,
                * ne,
                * gt,
                * ge,
                * lt,
                * le,
                * and,
                * or,
                * not,
                * ()

            Supported functions:
                * substringof('value',fieldName),
                * endswith(fieldName,'value'),
                * startswith(fieldName,'value'),
                * tolower(fieldName),
                * toupper(fieldName)
                        
            Examples:

            * _filter=`firstname eq 'Jeffrey'`

            * _filter=`id eq guid'a14c149a-2ce0-41d4-b532-02189ad3cb22'`

            * _filter=`startsWith(lastname,'leb') or dateAdded ge
            datetime'1998-03-06T20:38:07Z'`
          x-nullable: true
        - type: string
          name: _sort
          in: query
          description: >-
            Optional list of comma-separated fields to sort the collection by.


            The referenced fields must allow sorting. See the respective
            report's schema for which fields can be sorted. 

            If not specified, all report fields are returned.


            To sort in a descending manner, prefix the field name with `-`. For
            example, 

            `_sort=name,-date`, sorts the collection of items by `name`
            (ascending) 

            and then by `date` (descending).
          x-nullable: true
        - type: string
          name: _limit
          in: query
          description: >-
            The maximum number of items to return in the current page of the
            collection.
          x-nullable: true
        - type: string
          name: _offset
          in: query
          description: The number of pages to offset into the collection.
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/LessonResource'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /lessons/{id}:
    get:
      tags:
        - Lessons
      summary: Get lesson.
      operationId: Lessons_GetLesson
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The lesson ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: >-
            Additional properties may be returned depending on the lesson's
            type.
          schema:
            $ref: '#/definitions/NonPagedLessonResource'
        '404':
          x-nullable: false
          description: Lesson not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/{courseId}/lessons:
    get:
      tags:
        - Lessons
      summary: List lessons from a specific online course.
      operationId: Lessons_GetCourseLessons
      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: '1'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/NonPagedLessonResource'
        '404':
          x-nullable: false
          description: Course not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/{courseId}/lessons/{lessonId}:
    get:
      tags:
        - Lessons
      summary: Get lesson from a specific course.
      operationId: Lessons_GetCourseLessonById
      parameters:
        - type: string
          name: courseId
          in: path
          required: true
          description: The course ID.
          format: guid
          x-nullable: false
        - type: string
          name: lessonId
          in: path
          required: true
          description: The lesson ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: >-
            Additional properties may be returned depending on the lesson's
            type.
          schema:
            $ref: '#/definitions/NonPagedLessonResource'
        '404':
          x-nullable: false
          description: Lesson or course not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/{courseId}/chapters/{chapterId}/lessons/{lessonId}:
    get:
      tags:
        - Lessons
      summary: Get lesson from a specific course and chapter.
      operationId: Lessons_GetCourseChapterLessonById
      parameters:
        - type: string
          name: courseId
          in: path
          required: true
          description: The course ID.
          format: guid
          x-nullable: false
        - type: string
          name: chapterId
          in: path
          required: true
          description: The chapter ID.
          format: guid
          x-nullable: false
        - type: string
          name: lessonId
          in: path
          required: true
          description: The lesson ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: >-
            Additional properties may be returned depending on the lesson's
            type.
          schema:
            $ref: '#/definitions/NonPagedLessonResource'
        '404':
          x-nullable: false
          description: Course, chapter, or lesson not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  LessonResource:
    type: object
    description: Represents information about a lesson in the Integration API
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The unique lesson identifier.
        format: guid
      chapterId:
        type: string
        description: |-
          `Filterable` 

          The lesson's chapter ID.
        format: guid
      name:
        type: string
        description: |-
          `Default Sort` `Sortable` `Filterable` 

          The lesson's name.
      description:
        type: string
        description: |-
          `Filterable` 

          The lesson's description.
      notes:
        type: string
        description: |-
          `Filterable` 

          The lesson's notes.
      type:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The lesson's type.
      width:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The lesson's content width.
        format: int32
      height:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The lesson's content height.
        format: int32
      url:
        type: string
        description: |-
          `Filterable` 

          The lesson's URL.
      usePopup:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if the lesson is displayed in a popup window, false otherwise.
      passingScore:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The lesson's passing score, as a percentage.
        format: decimal
      weight:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The lesson's weight.
        format: decimal
      refId:
        type: string
        description: |-
          `Filterable` 

          The lesson's reference ID
      order:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The lesson's order within a chapter.
        format: int32
  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'
  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
  NonPagedLessonResource:
    type: object
    description: >-
      This class is NOT to be used as an actual response. This is to be used as
      the `SwaggerResponse` return type for

      non-paginated endpoints that return LessonResource.
    properties:
      id:
        type: string
        description: The unique lesson identifier.
        format: guid
      chapterId:
        type: string
        description: The lesson's chapter ID.
        format: guid
      name:
        type: string
        description: The lesson's name.
      description:
        type: string
        description: The lesson's description.
      notes:
        type: string
        description: The lesson's notes.
      type:
        type: string
        description: The lesson's type.
      width:
        type: integer
        description: The lesson's content width.
        format: int32
      height:
        type: integer
        description: The lesson's content height.
        format: int32
      url:
        type: string
        description: The lesson's URL.
      usePopup:
        type: boolean
        description: True if the lesson is displayed in a popup window, false otherwise.
      passingScore:
        type: number
        description: The lesson's passing score, as a percentage.
        format: decimal
      weight:
        type: number
        description: The lesson's weight.
        format: decimal
      refId:
        type: string
        description: The lesson's reference ID
      order:
        type: integer
        description: The lesson's order within a chapter.
        format: int32
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Lessons
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
