360Learning Classrooms API

The Classrooms API from 360Learning β€” 13 operation(s) for classrooms.

OpenAPI Specification

360learning-classrooms-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bulk Authentication Classrooms API
  description: ''
  version: 1.0.0
  contact: {}
servers:
- url: https://app.360learning.com
  description: Production EU
- url: https://app.us.360learning.com
  description: Production US
tags:
- name: Classrooms
paths:
  /api/v2/classrooms:
    post:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:write`.


        Creates a classroom.'
      operationId: v2.classrooms.CreateClassroomController_createClassroom
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InputClassroomDTO'
      responses:
        '201':
          description: Returns the created classroom.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassroomDTO'
        '400':
          description: 'Some of the given medias are not allowed in a classroom. Allowed types are: attachment, excel, flash, image, pdf, slideshow, video, word'
          content:
            application/json:
              schema:
                title: Bad Media Type
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - badMediaType
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `groupId` does not correspond to any existing group.
                  title: Group Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - groupNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: Some of the given media IDs do not correspond to any existing media.
                  title: Media Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mediaNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Create a classroom
      tags:
      - Classrooms
    get:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:read`.


        > πŸ“–

        >

        > This endpoint is paginated with a page size of 500 classrooms. For more information, see the [Pagination guide](doc:pagination).


        Lists all classrooms in your platform.'
      operationId: v2.classrooms.GetClassroomsController_getClassrooms
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: groupId
        required: false
        in: query
        style: deepObject
        explode: true
        description: 'Filter on **groupId** property with LHS bracket notation.


          Expected value format is a valid ID (24 digits or letters).'
        schema:
          properties:
            eq:
              type: string
              format: ObjectId
              pattern: ^[a-fA-F0-9]{24}$
              description: Filter on values equal to the given one
              example: 507f1f77bcf86cd799439011
            ne:
              type: string
              format: ObjectId
              pattern: ^[a-fA-F0-9]{24}$
              description: Filter on values not equal to the given one
              example: 507f1f77bcf86cd799439011
            in:
              type: array
              description: Filter on values including the given ones
              items:
                type: string
                format: ObjectId
                pattern: ^[a-fA-F0-9]{24}$
                example: 507f1f77bcf86cd799439011
            nin:
              type: array
              description: Filter on values excluding the given ones
              items:
                type: string
                format: ObjectId
                pattern: ^[a-fA-F0-9]{24}$
                example: 507f1f77bcf86cd799439011
      - name: createdAt
        required: false
        in: query
        style: deepObject
        explode: true
        description: 'Filter on **createdAt** property with LHS bracket notation.


          Expected value format is a date (YYYY-MM-DDThh:mm:ss.sssZ). The milliseconds are always set to 0.'
        schema:
          properties:
            lt:
              type: string
              format: date-time
              description: Filter on dates lower than the given one
              example: '2020-01-01T10:30:26.000Z'
            gte:
              type: string
              format: date-time
              description: Filter on dates greater than or equal the given one
              example: '2020-01-01T10:30:26.000Z'
      - name: modifiedAt
        required: false
        in: query
        style: deepObject
        explode: true
        description: 'Filter on **modifiedAt** property with LHS bracket notation.


          Expected value format is a date (YYYY-MM-DDThh:mm:ss.sssZ). The milliseconds are always set to 0.'
        schema:
          properties:
            lt:
              type: string
              format: date-time
              description: Filter on dates lower than the given one
              example: '2020-01-01T10:30:26.000Z'
            gte:
              type: string
              format: date-time
              description: Filter on dates greater than or equal the given one
              example: '2020-01-01T10:30:26.000Z'
      responses:
        '200':
          description: Returns one page of 500 classrooms.
          headers:
            Link:
              schema:
                type: string
              description: 'URL (between `<` `>`) to fetch the immediate next page of results. For more information, see our [Pagination guide](doc:pagination).


                ⚠️ Only included if there is another page of results.'
              example: <my/resource/url>; rel="next"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClassroomDTO'
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: List all classrooms
      tags:
      - Classrooms
  /api/v2/classrooms/{classroomId}:
    get:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:read`.


        Retrieves information about a classroom given its ID.'
      operationId: v2.classrooms.GetClassroomController_getClassroom
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: classroomId
        required: true
        in: path
        description: The unique ID of the classroom.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '200':
          description: Returns the information about the given classroom. The classroom must be linked to a group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassroomDTO'
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The given `classroomId` does not correspond to any existing classroom.
          content:
            application/json:
              schema:
                title: Classroom Not Found
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - classroomNotFound
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Retrieve a classroom
      tags:
      - Classrooms
    patch:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:write`.


        Edits specific fields of an existing classroom. Fields not included in the request payload remain unchanged.'
      operationId: v2.classrooms.UpdateClassroomController_updateClassroom
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: classroomId
        required: true
        in: path
        description: The unique ID of the classroom.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchClassroomDTO'
      responses:
        '200':
          description: Returns the updated classroom.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassroomDTO'
        '400':
          description: The server cannot or will not process the request due to something that is perceived to be a client error.
          content:
            application/json:
              schema:
                oneOf:
                - description: 'Some of the given medias are not allowed in a classroom. Allowed types are: attachment, excel, flash, image, pdf, slideshow, video, word'
                  title: Bad Media Type
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - badMediaType
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given classroom does not belong to a group.
                  title: Unsupported Classroom Type
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - unsupportedClassroomType
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `classroomId` does not correspond to any existing classroom.
                  title: Classroom Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - classroomNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: Some of the given media IDs do not correspond to any existing media.
                  title: Media Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mediaNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: Edit a classroom
      tags:
      - Classrooms
  /api/v2/classrooms/{classroomId}/registrations:
    get:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:read`.


        > πŸ“–

        >

        > This endpoint is paginated with a page size of 2,000 slot registrations. For more information, see the [Pagination guide](doc:pagination).


        Lists all users registered to any slot in the given classroom.'
      operationId: v2.classrooms.GetClassroomRegistrationsController_getClassroomRegistrations
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: classroomId
        required: true
        in: path
        description: The unique ID of the classroom.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      responses:
        '200':
          description: Returns one page of 2000 slot registrations.
          headers:
            Link:
              schema:
                type: string
              description: 'URL (between `<` `>`) to fetch the immediate next page of results. For more information, see our [Pagination guide](doc:pagination).


                ⚠️ Only included if there is another page of results.'
              example: <my/resource/url>; rel="next"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SlotRegistrationWithClassroomSlotIdDTO'
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The given `classroomId` does not correspond to any existing classroom.
          content:
            application/json:
              schema:
                title: Classroom Not Found
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - classroomNotFound
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '429':
          description: 'The client has sent too many requests in a short amount of time. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - tooManyRequests
                required:
                - error
      security:
      - oauth2: []
      summary: List all registrations in a classroom
      tags:
      - Classrooms
  /api/v2/classrooms/{classroomId}/slots:
    post:
      description: '> πŸ”‘

        >

        > Required OAuth scope: `classrooms:write`.


        Adds a slot to a given classroom.'
      operationId: v2.classrooms.CreateClassroomSlotController_createClassroomSlot
      parameters:
      - name: 360-api-version
        in: header
        description: The version of the API.
        required: true
        schema:
          type: string
          enum:
          - v2.0
      - name: classroomId
        required: true
        in: path
        description: The unique ID of the classroom.
        schema:
          format: ObjectId
          pattern: ^[a-fA-F0-9]{24}$
          example: 507f1f77bcf86cd799439011
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InputClassroomSlotDTO'
      responses:
        '201':
          description: Returns the created classroom slot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PathClassroomSlotDTO'
        '400':
          description: The server cannot or will not process the request due to something that is perceived to be a client error.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `endDate` is before the given `startDate`.
                  title: Invalid Start Or End Date
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - invalidStartOrEndDate
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: 'Some of the given medias are not allowed in a classroom. Allowed types are: attachment, excel, flash, image, pdf, slideshow, video, word'
                  title: Bad Media Type
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - badMediaType
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The classroom dates are out of the parent path session dates.
                  title: Out Of Path Session Dates
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - outOfPathSessionDates
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
        '401':
          description: The given access token is either missing, invalid, has expired, or has been revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_token
                required:
                - error
        '403':
          description: The given access token does not have the required OAuth scope to execute the request.
          content:
            application/json:
              schema:
                title: Invalid Scope
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                        - invalid_scope
                      message:
                        type: string
                        example: A human-readable message to help with debugging.
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - description: The given `classroomId` does not correspond to any existing classroom.
                  title: Classroom Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - classroomNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: Some of the given media IDs do not correspond to any existing media.
                  title: Media Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - mediaNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: The given `context._id` does not correspond to any existing path session.
                  title: Path Session Not Found
                  type: object
                  properties:
                    error:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - pathSessionNotFound
                        message:
                          type: string
                          example: A human-readable message to help with debugging.
                      required:
                      - code
                      - message
                  required:
                  - error
                - description: At least one of the given `trainerIds` does not correspond to any existing and non-deleted user.
                  title: Users No

# --- truncated at 32 KB (147 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/360learning/refs/heads/main/openapi/360learning-classrooms-api-openapi.yml