> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scoutforschools.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Classes

> Return collection of all classes.



## OpenAPI

````yaml /api-reference/openapi.json get /ims/oneroster/v1p2/classes
openapi: 3.1.0
info:
  title: Scout API
  version: 1.0.0
  description: >-
    Programmatic access to Scout rostering data (IMS OneRoster 1.1 & 1.2) and
    related endpoints, authenticated with an API access token.
servers:
  - url: https://api.teachwithscout.com/v1
    description: Production
security: []
paths:
  /ims/oneroster/v1p2/classes:
    get:
      summary: Get Classes
      description: Return collection of all classes.
      parameters:
        - name: limit
          in: query
          description: >-
            To define the download segmentation value i.e. the maximum number of
            records to be contained in the response.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 100
        - name: offset
          in: query
          description: >-
            The number of the first record to be supplied in the segmented
            response message.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
            default: 0
        - name: sort
          in: query
          description: >-
            Identifies the sort criteria to be used for the records in the
            response message. Use with the orderBy parameter.
          required: false
          schema:
            type: string
        - name: orderBy
          in: query
          description: >-
            The form of ordering for response to the sorted request i.e.
            ascending (asc) or descending (desc).
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: filter
          in: query
          description: >-
            The filtering rules to be applied when identifying the records to be
            supplied in the response message.
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: >-
            To identify the range of fields that should be supplied in the
            response message.
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          headers:
            X-Total-Count:
              description: The total number of resources that are available
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  classes:
                    type: array
                    items:
                      type: object
                      properties:
                        sourcedId:
                          type: string
                        status:
                          type: string
                          enum:
                            - active
                            - tobedeleted
                        dateLastModified:
                          type: string
                          format: date-time
                        title:
                          type: string
                        classCode:
                          type: string
                        classType:
                          type: string
                          enum:
                            - homeroom
                            - scheduled
                        location:
                          type: string
                        grades:
                          type: array
                          items:
                            type: string
                        subjects:
                          type: array
                          items:
                            type: string
                        course:
                          type: object
                          properties:
                            href:
                              type: string
                            sourcedId:
                              type: string
                            type:
                              type: string
                              enum:
                                - course
                          required:
                            - href
                            - sourcedId
                            - type
                        school:
                          type: object
                          properties:
                            href:
                              type: string
                            sourcedId:
                              type: string
                            type:
                              type: string
                              enum:
                                - org
                          required:
                            - href
                            - sourcedId
                            - type
                        terms:
                          type: array
                          items:
                            type: object
                            properties:
                              href:
                                type: string
                              sourcedId:
                                type: string
                              type:
                                type: string
                                enum:
                                  - academicSession
                            required:
                              - href
                              - sourcedId
                              - type
                        subjectCodes:
                          type: array
                          items:
                            type: string
                        periods:
                          type: array
                          items:
                            type: string
                        resources:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                      required:
                        - sourcedId
                        - status
                        - dateLastModified
                        - title
                        - classType
                        - grades
                        - subjects
                        - course
                        - school
                        - terms
                        - subjectCodes
                        - periods
                        - resources
                required:
                  - classes
      security:
        - accessToken: []
components:
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer access token obtained from the OneRoster token endpoint. Send it
        as `Authorization: Bearer <access_token>` on every request. Tokens
        expire after 1 hour.

````