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

# Get Operation Status

> Retrieves the status of a background operation. Check again while pending or running. A completed status confirms success, and a failed status includes an error.



## OpenAPI

````yaml get /operations/{id}
openapi: 3.0.1
info:
  title: SchoolMaker API V1
  description: API for managing your SchoolMaker school
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://schoolmaker.co/api/v1
    description: Production API
security:
  - bearerAuth: []
paths:
  /operations/{id}:
    get:
      summary: Get Operation Status
      description: >-
        Retrieves the status of a background operation. Check again while
        pending or running. A completed status confirms success, and a failed
        status includes an error.
      operationId: getOperationStatus
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationStatus'
        '202':
          description: Operation pending. Check again until completed or failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationStatus'
        '401':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    OperationStatus:
      type: object
      required:
        - id
        - operation
        - status
        - result
        - error
      properties:
        id:
          type: string
        operation:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
        result:
          type: object
          nullable: true
          additionalProperties: true
          description: Result of the completed operation. Fields depend on the operation.
        error:
          type: string
          nullable: true
    APIError:
      type: object
      properties:
        error:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.