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:
  /sessions:
    get:
      tags:
        - Sessions
      summary: List sessions.
      description: Lists available sessions from all ILCs.
      operationId: Sessions_GetSessions
      parameters:
        - type: string
          name: externalId
          in: query
          description: '*(Deprecated)* The specified external ID to filter by.'
          x-nullable: true
        - 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/SessionsResource'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /sessions/{id}:
    get:
      tags:
        - Sessions
      summary: Get session.
      operationId: Sessions_GetSession
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The session 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/NonPagedSessionResource'
        '404':
          x-nullable: false
          description: Session not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/{courseId}/sessions:
    get:
      tags:
        - Sessions
      summary: List sessions from a specific ILC.
      operationId: Sessions_GetInstructorLedCourseSessions
      parameters:
        - type: string
          name: courseId
          in: path
          required: true
          description: The instructor led 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/NonPagedSessionResource'
        '404':
          x-nullable: false
          description: ILC not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/{courseId}/sessions/{sessionId}:
    get:
      tags:
        - Sessions
      summary: Get session from a specific ILC.
      operationId: Sessions_GetInstructorLedCourseSessionById
      parameters:
        - type: string
          name: courseId
          in: path
          required: true
          description: The instructor led course ID.
          format: guid
          x-nullable: false
        - type: string
          name: sessionId
          in: path
          required: true
          description: The session 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/NonPagedSessionResource'
        '404':
          x-nullable: false
          description: ILC or session not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /courses/session-details:
    post:
      tags:
        - Session Details
      summary: List available session details from specific ILCs.
      operationId: Sessions_GetSessionDetailsByCourses
      parameters:
        - name: request
          in: body
          schema:
            $ref: '#/definitions/GetSessionDetailsByCoursesRequest'
          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:
            type: array
            items:
              $ref: '#/definitions/SessionDetailResource'
        '400':
          x-nullable: false
          description: The required body paramaters were not included.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /users/{userId}/session-details:
    get:
      tags:
        - Session Details
      summary: List sessions from a specific user's ILC enrollments.
      description: >-
        Additionally lists other available sessions that exist in the enrolled
        ILCs.
      operationId: Sessions_GetSessionDetailsByUser
      parameters:
        - type: string
          name: userId
          in: path
          required: true
          description: The user 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/UserSessionDetailResource'
        '404':
          x-nullable: false
          description: User not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  SessionsResource:
    type: object
    description: Represents a collection of SessionResource.
    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
      sessions:
        type: array
        items:
          $ref: '#/definitions/SessionResource'
  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'
  SessionResource:
    type: object
    description: Represents information about a session for an Integration API endpoint.
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The session ID.
        format: guid
      name:
        type: string
        description: |-
          `Default Sort` `Sortable` `Filterable` 

          The session name.
      description:
        type: string
        description: |-
          `Filterable` 

          The session description.
      notes:
        type: string
        description: |-
          `Filterable` 

          The session notes.
      instructorIds:
        type: array
        description: |-
          `Filterable` 

          The list of instructor IDs.
        items:
          type: string
          format: guid
      approvalType:
        description: >-
          `Sortable` `Filterable` 


          The session approval type.


          Possible Enum Values: `0 = None` `1 = Instructor` `2 = Administrator`
          `3 = CourseEditor` `4 = Supervisor` `5 = Other` 
        allOf:
          - $ref: '#/definitions/ApprovalType'
      approvalIds:
        type: array
        description: >-
          `Filterable` 


          The explicit list of user IDs permitted to approve enrollments into
          this session.
        items:
          type: string
          format: guid
      attendanceReminder:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The session attendance reminder.
        format: int32
      enrollmentEndDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The session enrollment end date.
        format: date-time
      enrollmentStartDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The session enrollment start date.
        format: date-time
      dateEdited:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The date the session was edited.
        format: date-time
      dateAdded:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The date the session was added.
        format: date-time
      minimumClassSize:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The session's minimum class size.
        format: int32
      maximumClassSize:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The session's maximum class size.
        format: int32
      isWaitlistEnabled:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if the session's waitlist is enabled, false otherwise. 
      allowSelfEnrollment:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if the session allows self enrollment, false otherwise.
      sessionScheduleIds:
        type: array
        description: |-
          `Filterable` 

          The list of session schedule IDs.
        items:
          type: string
          format: guid
      externalId:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The session external ID.
  ApprovalType:
    type: integer
    description: The allowable instructor led course session approval types.
    x-enumNames:
      - None
      - Instructor
      - Administrator
      - CourseEditor
      - Supervisor
      - Other
    enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
  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
  NonPagedSessionResource:
    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 SessionResource.
    properties:
      id:
        type: string
        description: The session ID.
        format: guid
      name:
        type: string
        description: The session name.
      description:
        type: string
        description: The session description.
      notes:
        type: string
        description: The session notes.
      instructorIds:
        type: array
        description: The list of instructor IDs.
        items:
          type: string
          format: guid
      approvalType:
        description: >-
          The session approval type.


          Possible Enum Values: `0 = None` `1 = Instructor` `2 = Administrator`
          `3 = CourseEditor` `4 = Supervisor` `5 = Other` 
        allOf:
          - $ref: '#/definitions/ApprovalType'
      approvalIds:
        type: array
        description: >-
          The explicit list of user IDs permitted to approve enrollments into
          this session.
        items:
          type: string
          format: guid
      attendanceReminder:
        type: integer
        description: The session attendance reminder.
        format: int32
      enrollmentEndDate:
        type: string
        description: The session enrollment end date.
        format: date-time
      enrollmentStartDate:
        type: string
        description: The session enrollment start date.
        format: date-time
      dateEdited:
        type: string
        description: The date the session was edited.
        format: date-time
      dateAdded:
        type: string
        description: The date the session was added.
        format: date-time
      minimumClassSize:
        type: integer
        description: The session's minimum class size.
        format: int32
      maximumClassSize:
        type: integer
        description: The session's maximum class size.
        format: int32
      isWaitlistEnabled:
        type: boolean
        description: 'True if the session''s waitlist is enabled, false otherwise. '
      allowSelfEnrollment:
        type: boolean
        description: True if the session allows self enrollment, false otherwise.
      sessionScheduleIds:
        type: array
        description: The list of session schedule IDs.
        items:
          type: string
          format: guid
      externalId:
        type: string
        description: The session external ID.
  SessionDetailResource:
    type: object
    description: Represents detailed information about a session in the Integration API.
    properties:
      id:
        type: string
        description: The unique session identifier.
        format: guid
      instructorLedCourseId:
        type: string
        description: The session's instructor led course ID.
        format: guid
      name:
        type: string
        description: The session's name.
      description:
        type: string
        description: The session's description.
      approvalType:
        description: >-
          The session's approval type.


          Possible Enum Values: `0 = None` `1 = Instructor` `2 = Administrator`
          `3 = CourseEditor` `4 = Supervisor` `5 = Other` 
        allOf:
          - $ref: '#/definitions/ApprovalType'
      enrollmentStartDate:
        type: string
        description: >-
          The session's optional UTC date that enrollments into the session are
          accepted.
        format: date-time
      enrollmentEndDate:
        type: string
        description: >-
          The session's optional UTC date that enrollments into the session are
          no longer accepted.
        format: date-time
      enrollmentCount:
        type: integer
        description: The session's enrollment count.
        format: int32
      isWaitlistEnabled:
        type: boolean
        description: True if the session has a waitlist enabled, false otherwise.
      enrollmentLimit:
        type: integer
        description: The session's optional limit on the number of enrollments allowed.
        format: int32
      enrollmentMinimum:
        type: integer
        description: >-
          The session's minimum number of enrollments required to be considered
          valid.
        format: int32
      instructorIds:
        type: array
        description: The session's list of instructor IDs.
        items:
          type: string
          format: guid
      externalId:
        type: string
        description: The session's external ID.
      classes:
        type: array
        description: The session's list of classes.
        items:
          $ref: '#/definitions/ClassDetailResource'
  ClassDetailResource:
    type: object
    description: >-
      Represents detailed information about a session class in the Integration
      API.
    properties:
      id:
        type: string
        description: The unique class identifier.
        format: guid
      sessionId:
        type: string
        description: The class's session ID.
        format: guid
      utcStartDate:
        type: string
        description: The class's start date in UTC.
        format: date-time
      utcEndDate:
        type: string
        description: The class's end date in UTC.
        format: date-time
      timeZone:
        type: string
        description: The class's timezone.
      meetingUrl:
        type: string
        description: The class's meeting URL.
      meetingDescription:
        type: string
        description: The class's meeting description.
      venue:
        description: The class's venue.
        allOf:
          - $ref: '#/definitions/VenueResource'
  VenueResource:
    type: object
    description: Represents information about a venue in the Integration API.
    properties:
      id:
        type: string
        description: The unique venue identifier.
        format: guid
      name:
        type: string
        description: The venue's name.
      venueType:
        description: >-
          The venue's type.


          Possible Enum Values: `0 = Classroom` `1 = ConnectPro` `2 = WebEx` `3
          = GoToMeeting` `4 = Url` `5 = ZoomMeeting` `6 = ZoomWebinar` `7 =
          TeamsMeeting` `8 = WebexMeeting` 
        allOf:
          - $ref: '#/definitions/VenueType'
      url:
        type: string
        description: The venue's virtual meeting space.
      phoneNumber:
        type: string
        description: The venue's phone number.
      address:
        type: string
        description: The venue's street address.
      city:
        type: string
        description: The venue's city.
      province:
        type: string
        description: The venue's province.
      postalCode:
        type: string
        description: The venue's postal code/zip.
      country:
        type: string
        description: The venue's country.
      maxClassSize:
        type: integer
        description: The venue's maximum class size.
        format: int32
      details:
        type: string
        description: The venue's details.
      meetingId:
        type: string
        description: The venue's meeting ID.
      username:
        type: string
        description: The venue's username.
      password:
        type: string
        description: The venue's password.
  VenueType:
    type: integer
    description: Defines an enumeration for the venue types.
    x-enumNames:
      - Classroom
      - ConnectPro
      - WebEx
      - GoToMeeting
      - Url
      - ZoomMeeting
      - ZoomWebinar
      - TeamsMeeting
      - WebexMeeting
    enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
  GetSessionDetailsByCoursesRequest:
    type: object
    description: The request to list session details from specific instructor led courses.
    properties:
      ids:
        type: array
        description: List of unique instructor led course identifiers.
        items:
          type: string
  UserSessionDetailResource:
    type: object
    description: >-
      Represents detailed information about a user session in the Integration
      API.
    properties:
      id:
        type: string
        description: The unique session identifier.
        format: guid
      instructorLedCourseId:
        type: string
        description: The session's instructor led course ID.
        format: guid
      name:
        type: string
        description: The session's name.
      description:
        type: string
        description: The session's description.
      approvalType:
        description: >-
          The session's approval type.


          Possible Enum Values: `0 = None` `1 = Instructor` `2 = Administrator`
          `3 = CourseEditor` `4 = Supervisor` `5 = Other` 
        allOf:
          - $ref: '#/definitions/ApprovalType'
      enrollmentStartDate:
        type: string
        description: >-
          The session's optional UTC date that enrollments into the session are
          accepted.
        format: date-time
      enrollmentEndDate:
        type: string
        description: >-
          The session's optional UTC date that enrollments into the session are
          no longer accepted.
        format: date-time
      enrollmentCount:
        type: integer
        description: The session's enrollment count.
        format: int32
      isWaitlistEnabled:
        type: boolean
        description: True if the session has a waitlist enabled, false otherwise.
      enrollmentLimit:
        type: integer
        description: The session's optional limit on the number of enrollments allowed.
        format: int32
      enrollmentMinimum:
        type: integer
        description: >-
          The session's minimum number of enrollments required to be considered
          valid.
        format: int32
      instructorIds:
        type: array
        description: The session's list of instructor IDs.
        items:
          type: string
          format: guid
      externalId:
        type: string
        description: The session's external ID.
      classes:
        type: array
        description: The session's list of classes.
        items:
          $ref: '#/definitions/ClassDetailResource'
      isEnrolledInSession:
        type: boolean
        description: True if user is enrolled in session, false otherwise.
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
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
