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:
  /online-courses:
    get:
      tags:
        - Online Courses
      summary: List online courses.
      description: >-
        Lists all selected LMS online courses that are available to the current,
        authenticated administrator.
      operationId: OnlineCourses_GetOnlineCourses
      parameters:
        - type: string
          name: limit
          in: query
          description: >-
            *(Deprecated)* The maximum number of items to return in the current
            page of the collection.
          x-nullable: true
        - type: string
          name: offset
          in: query
          description: '*(Deprecated)* The number of pages to offset into the collection.'
          x-nullable: true
        - 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: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/OnlineCoursesResource'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /online-courses/{id}:
    get:
      tags:
        - Online Courses
      summary: Get online course.
      operationId: OnlineCourses_GetOnlineCourse
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The online 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:
            $ref: '#/definitions/NonPagedOnlineCourseResource'
        '404':
          x-nullable: false
          description: Online Course not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  OnlineCoursesResource:
    type: object
    description: Represents a collection of OnlineCourseResource.
    properties:
      totalItems:
        type: integer
        description: The total number of items in the unbounded collection
        format: int32
      returnedItems:
        type: integer
        description: The number of items in the bound collection being returned
        format: int32
      limit:
        type: integer
        description: The current page size for the collection
        format: int32
      offset:
        type: integer
        description: The current offset for the collection
        format: int32
      onlineCourses:
        type: array
        description: The paged collection of resources.
        items:
          $ref: '#/definitions/OnlineCourseResource'
  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'
  OnlineCourseResource:
    type: object
    description: >-
      Represents information about an online course for an Integration API
      endpoint.
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The unique course identifier.
        format: guid
      courseType:
        type: string
        description: >-
          `Sortable` `Filterable` 


          The course's type (ex, OnlineCourse, InstructorLedCourse,
          CourseBundle, Curriculum).
      name:
        type: string
        description: |-
          `Default Sort` `Sortable` `Filterable` 

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

          The course's description.

          Supports HTML.
      notes:
        type: string
        description: |-
          `Filterable` 

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

          The course's external ID.
      accessDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's access date.
        format: date-time
      expireType:
        description: |-
          `Sortable` `Filterable` 

          The course's expiry type. 

          Possible Enum Values: `0 = None` `1 = Date` `2 = Duration` 
        allOf:
          - $ref: '#/definitions/ExpireType'
      expireDuration:
        description: |-
          `Filterable` 

          The course's duration until expiry, if applicable.
        allOf:
          - $ref: '#/definitions/DurationResource'
      expiryDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's expiry date, if applicable.
        format: date-time
      activeStatus:
        description: |-
          `Sortable` `Filterable` 

          The course's status.

          Possible Enum Values: `0 = Active` `1 = Inactive` 
        allOf:
          - $ref: '#/definitions/CourseActiveStatus'
      tagIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of tag IDs.
        items:
          type: string
          format: guid
      resourceIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of resource IDs.
        items:
          type: string
          format: guid
      editorIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of editor IDs.
        items:
          type: string
          format: guid
      prices:
        type: array
        description: |-
          `Filterable` 

          The course's list of prices.
        items:
          $ref: '#/definitions/PriceResource'
      competencyDefinitionIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of competency definition IDs.
        items:
          type: string
          format: guid
      prerequisiteCourseIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of prerequisite course IDs.
        items:
          type: string
          format: guid
      postEnrollmentCourseIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of post enrollment course IDs.
        items:
          type: string
          format: guid
      allowCourseEvaluation:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if the course allows evaluation, false otherwise.
      categoryId:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's category ID.
        format: guid
      certificateUrl:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's certificate URL, if any.
      audience:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's audience.
      goals:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's goals.
      vendor:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's vendor.
      companyCost:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's company cost.
        format: decimal
      learnerCost:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's learner cost.
        format: decimal
      companyTime:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's amount of company time.
        format: decimal
      learnerTime:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's amount of learner time.
        format: decimal
      dateEdited:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's last edited date.
        format: date-time
      dateAdded:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The date the course was added.
        format: date-time
      chapterIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of chapter IDs.
        items:
          type: string
          format: guid
      showMobileAlert:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if mobile alerts are enabled, false otherwise.
      completionType:
        description: >-
          `Sortable` `Filterable` 


          The course's completion type.


          Possible Enum Values: `0 = All` `1 = AllByChapter` `2 =
          AssessmentsOnly` 
        allOf:
          - $ref: '#/definitions/CompletionType'
  ExpireType:
    type: integer
    description: Represents the type of expiry an entity can have
    x-enumNames:
      - None
      - Date
      - Duration
    enum:
      - 0
      - 1
      - 2
  DurationResource:
    type: object
    description: Represents a timeframe, usually for when something expires, like a Course.
    properties:
      years:
        type: integer
      months:
        type: integer
        description: The number of months in the duration.
      days:
        type: integer
        description: The number of days in the duration.
      hours:
        type: integer
        description: The number of hours in the duration.
  CourseActiveStatus:
    type: integer
    description: |-
      Represents the overall accessibility of courses.
                  
    x-enumNames:
      - Active
      - Inactive
    enum:
      - 0
      - 1
  PriceResource:
    type: object
    description: Resource representing a Price on a Course.
    properties:
      id:
        type: string
        description: The ID of the course price.
        format: guid
      departmentId:
        type: string
        description: The ID of the department that this course price applies to.
        format: guid
      currency:
        type: string
        description: The symbol that is used to describe the currency (ex, £, €, $, etc)
      amount:
        type: number
        description: The amount to charge for a course.
        format: decimal
  CompletionType:
    type: integer
    description: 'Defines an enumeration for types of course lesson completion. '
    x-enumNames:
      - All
      - AllByChapter
      - AssessmentsOnly
    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
  NonPagedOnlineCourseResource:
    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 OnlineCourseResource.
    properties:
      chapterIds:
        type: array
        description: The course's list of chapter IDs.
        items:
          type: string
          format: guid
      showMobileAlert:
        type: boolean
        description: True if mobile alerts are enabled, false otherwise.
      completionType:
        description: >-
          The course's completion type.


          Possible Enum Values: `0 = All` `1 = AllByChapter` `2 =
          AssessmentsOnly` 
        allOf:
          - $ref: '#/definitions/CompletionType'
      id:
        type: string
        description: The unique course identifier.
        format: guid
      courseType:
        type: string
        description: >-
          The course's type (ex, OnlineCourse, InstructorLedCourse,
          CourseBundle, Curriculum).
      name:
        type: string
        description: The course's name.
      description:
        type: string
        description: |-
          The course's description.

          Supports HTML.
      notes:
        type: string
        description: The course's notes.
      externalId:
        type: string
        description: The course's external ID.
      accessDate:
        type: string
        description: The course's access date.
        format: date-time
      expireType:
        description: |-
          The course's expiry type. 

          Possible Enum Values: `0 = None` `1 = Date` `2 = Duration` 
        allOf:
          - $ref: '#/definitions/ExpireType'
      expireDuration:
        description: The course's duration until expiry, if applicable.
        allOf:
          - $ref: '#/definitions/DurationResource'
      expiryDate:
        type: string
        description: The course's expiry date, if applicable.
        format: date-time
      activeStatus:
        description: |-
          The course's status.

          Possible Enum Values: `0 = Active` `1 = Inactive` 
        allOf:
          - $ref: '#/definitions/CourseActiveStatus'
      tagIds:
        type: array
        description: The course's list of tag IDs.
        items:
          type: string
          format: guid
      resourceIds:
        type: array
        description: The course's list of resource IDs.
        items:
          type: string
          format: guid
      editorIds:
        type: array
        description: The course's list of editor IDs.
        items:
          type: string
          format: guid
      prices:
        type: array
        description: The course's list of prices.
        items:
          $ref: '#/definitions/PriceResource'
      competencyDefinitionIds:
        type: array
        description: The course's list of competency definition IDs.
        items:
          type: string
          format: guid
      prerequisiteCourseIds:
        type: array
        description: The course's list of prerequisite course IDs.
        items:
          type: string
          format: guid
      postEnrollmentCourseIds:
        type: array
        description: The course's list of post enrollment course IDs.
        items:
          type: string
          format: guid
      allowCourseEvaluation:
        type: boolean
        description: True if the course allows evaluation, false otherwise.
      categoryId:
        type: string
        description: The course's category ID.
        format: guid
      certificateUrl:
        type: string
        description: The course's certificate URL, if any.
      audience:
        type: string
        description: The course's audience.
      goals:
        type: string
        description: The course's goals.
      vendor:
        type: string
        description: The course's vendor.
      companyCost:
        type: number
        description: The course's company cost.
        format: decimal
      learnerCost:
        type: number
        description: The course's learner cost.
        format: decimal
      companyTime:
        type: number
        description: The course's amount of company time.
        format: decimal
      learnerTime:
        type: number
        description: The course's amount of learner time.
        format: decimal
      dateEdited:
        type: string
        description: The course's last edited date.
        format: date-time
      dateAdded:
        type: string
        description: The date the course was added.
        format: date-time
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Online Courses
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
