> ## 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 - Assignment

>  This API allows authenticated users to retrieve the details of a specific assignment by providing its unique ID.


 **Key Notes:** 
 - `id` (required in path): The unique identifier of the assignment to be retrieved. 
 - Returns all metadata related to the assignment including its name, institute details, grade, section, and document status.


 **Scenario: Viewing a Previously Created Assignment** 
 - A teacher wants to verify the information of an already created assignment. 
 - They send a GET request with the assignment's ID. 
 - The system returns all associated details, including whether documents were uploaded and if extraction has begun. 



## OpenAPI

````yaml GET /assignment-evaluation/v1/assignment/{id}/
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:
  /assignment-evaluation/v1/assignment/{id}/:
    get:
      tags:
        - Assignments
      summary: Get Assignment
      operationId: getAssignment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the assignment
      responses:
        '200':
          description: Assignment retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatedAssignmentResponse'
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Assignment not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 404
                      message:
                        type: object
                        properties:
                          non_field_errors:
                            type: array
                            items:
                              type: string
                              example: Assignment not found
      security:
        - bearerAuth: []
components:
  schemas:
    UpdatedAssignmentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 2600413f-7c6e-46ef-8ea9-3e7b5834879f
          description: Unique identifier for the assignment.
        assignmentName:
          type: string
          example: English Assignment
          description: Name of the assignment.
        status:
          type: integer
          example: 2
          description: >-
            Status of the assignment [(refer this doc to get the
            constants)](https://docs.crazygoldfish.com/api-reference/endpoint/assignments/v1-constants)
        grade:
          type: string
          example: '7'
          description: Grade of the assignment.
        marks:
          nullable: true
          type: integer
          example: 10
        section:
          type: string
          example: A
          description: Section of the assignment.
        parentInstituteId:
          type: string
          example: '100'
          description: ID of the parent institute.
        instituteId:
          type: string
          example: '200'
          description: ID of the institute.
        courseId:
          type: string
          example: '300'
          description: ID of the course.
        documents:
          type: array
          description: List of documents associated with the assignment.
          items:
            $ref: '#/components/schemas/AssignmentDocument'
        createdAt:
          type: string
          format: date-time
          example: '2025-04-06T09:03:42.099207Z'
          description: Created date for the assignment.
        modifiedAt:
          type: string
          format: date-time
          example: '2025-04-06T09:06:19.351379Z'
          description: Modified date of the assignment.
    403Response:
      type: object
      properties:
        detail:
          type: string
          example: Token has expired
    AssignmentDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: bec0d0bf-fff6-40de-9750-65f5dcaf470d
          description: Unique identifier for the document.
        status:
          type: integer
          example: 1
          description: Status of the document.
        pageNo:
          nullable: true
          type: integer
          example: 1
        uploadTime:
          type: string
          format: date-time
          example: '2025-04-06T09:04:11.716434Z'
          description: Upload time of the document.
        url:
          type: string
          format: uri
          example: >-
            https://cgfblob.blob.core.windows.net/documents/assignment-evaluation/olfactory_imagery_HW_PDF_2_questions_1_H7dPCAd.pdf
          description: URL of the document.
        fileType:
          type: integer
          example: 1
          description: Type of the file.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````