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

# GET - Subjects for Grade

>  This API allows authenticated users to retrieve all subjects for a specific grade within a board. 

 **How to Use:** 
 1. Call `GET /metadata/v1/board/{board_id}/grades/{grade_id}/subjects` with the required board's `id` and grade's `id` to get the list of all subjects for that grade. 
 2. Use the `id` of the required subject in lesson plans or any other feature that needs a subject reference. 

 **Example Scenario:** A teacher wants to create or view a lesson plan for a specific subject within a grade and board: - First, they call the boards API to list all boards and find the required board's `id`. - Then, they call the grades API to list all grades for that board and find the required grade's `id`. - Next, they call this API to list all subjects for that grade and find the required subject's `id`. - Finally, they use that subject `id` in the lesson plan API or anywhere else in the system where a subject reference is needed. 



## OpenAPI

````yaml GET /metadata/v1/board/{board_id}/grades/{grade_id}/subjects
openapi: 3.0.1
info:
  title: Evaluation Report API
  description: An API for retrieving evaluation reports.
  version: 1.0.0
servers:
  - url: https://api-staging.crazygoldfish.com
    description: SandBox endpoint
  - url: https://api.crazygoldfish.com
    description: Prod End Point
security: []
paths:
  /metadata/v1/board/{board_id}/grades/{grade_id}/subjects:
    get:
      summary: List Subjects for Grade
      description: >-
        Retrieve all subjects for a specific grade within a board. Use this
        endpoint to get the list of subjects associated with a grade, which can
        be used in lesson plans or other features. You must provide the board ID
        and grade ID in the path parameters.
      parameters:
        - name: board_id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the board.
        - name: grade_id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the grade.
      responses:
        '200':
          description: A list of subjects for the specified grade.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Subject'
              example:
                - name: English
                  id: 99f5312d-48f6-4c5c-8141-2eeb88f16290
                - name: Mathematics
                  id: e3edf414-eb46-4fa3-b8fc-b2cd0c39266e
                - name: Hindi
                  id: e20dec7b-0577-4f13-a54b-8cbbddec126c
                - name: Science
                  id: 6dd7ebda-1bc5-4c01-8649-372579189073
                - name: Social Science
                  id: 5aeb9455-7058-4f07-a532-b72db708edb6
                - name: Health and Physical Education
                  id: 1f3afbed-c93c-42cf-9228-733bd88fdcc0
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized User
                  data:
                    type: object
                    example: {}
                  status:
                    type: string
                    example: ''
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Board not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          example: Board not found
        '422':
          description: Validation Error - Invalid UUID format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: uuid_parsing
                        loc:
                          type: array
                          items:
                            type: string
                          example:
                            - path
                            - board_id
                        msg:
                          type: string
                          example: >-
                            Input should be a valid UUID, invalid group length
                            in group 4: expected 12, found 11
                        input:
                          type: string
                          example: baf36573-d049-4636-9c4b-bc9cda6270f
                        ctx:
                          type: object
                          properties:
                            error:
                              type: string
                              example: >-
                                invalid group length in group 4: expected 12,
                                found 11
      security:
        - bearerAuth: []
components:
  schemas:
    Subject:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the subject.
        name:
          type: string
          description: Name of the subject.
    403Response:
      type: object
      properties:
        detail:
          type: string
          example: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````