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

# Get Classrooms By User

> Returns a list of `Classrooms` this user is in (if a student) or owns (if a teacher).



## OpenAPI

````yaml GET /users/{handle}/classrooms
openapi: 3.0.1
info:
  title: CodeCombat API
  version: 0.0.1
servers:
  - url: https://codecombat.com/api
    description: default
security: []
paths:
  /users/{handle}/classrooms:
    get:
      tags:
        - Users
      summary: Get Classrooms By User
      description: >-
        Returns a list of `Classrooms` this user is in (if a student) or owns
        (if a teacher).
      operationId: users_getClassrooms
      parameters:
        - name: handle
          in: path
          description: The document's `_id` or `slug`.
          required: true
          schema:
            type: string
        - name: retMemberLimit
          in: query
          description: limit the return number of members for each classroom
          required: false
          schema:
            type: number
            format: double
            nullable: true
      responses:
        '200':
          description: The requested classrooms
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClassroomResponseWithCode'
      security:
        - BasicAuth: []
components:
  schemas:
    ClassroomResponseWithCode:
      title: ClassroomResponseWithCode
      type: object
      description: Subset of properties listed here
      properties:
        _id:
          $ref: '#/components/schemas/objectIdString'
          nullable: true
        name:
          type: string
          nullable: true
        members:
          type: array
          items:
            $ref: '#/components/schemas/objectIdString'
          nullable: true
        ownerID:
          $ref: '#/components/schemas/objectIdString'
          nullable: true
        description:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        codeCamel:
          type: string
          nullable: true
        courses:
          type: array
          items:
            $ref: '#/components/schemas/ClassroomResponseWithCodeCoursesItem'
          nullable: true
        clanId:
          $ref: '#/components/schemas/objectIdString'
          nullable: true
    objectIdString:
      title: objectIdString
      type: string
    ClassroomResponseWithCodeCoursesItem:
      title: ClassroomResponseWithCodeCoursesItem
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/objectIdString'
          nullable: true
        levels:
          type: array
          items:
            type: object
            additionalProperties: true
          nullable: true
        enrolled:
          type: array
          items:
            $ref: '#/components/schemas/objectIdString'
          nullable: true
        instance_id:
          $ref: '#/components/schemas/objectIdString'
          nullable: true
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic

````