CVAT projects API

Annotation projects that group tasks and share a label set.

OpenAPI Specification

cvat-projects-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: CVAT REST annotations projects API
  description: REST API for CVAT (Computer Vision Annotation Tool), an open-source platform for annotating images, video, and 3D point clouds. The same API is served by self-hosted CVAT (MIT-licensed) and by the hosted CVAT Online service at app.cvat.ai. Endpoints cover projects, tasks, jobs, annotations, labels, organizations, memberships, and cloud storage. The full machine-readable schema is published by each server at /api/schema/ and the interactive docs at /api/docs/. This document captures a representative subset of the documented surface.
  termsOfService: https://www.cvat.ai/terms-of-use
  contact:
    name: CVAT Support
    url: https://www.cvat.ai
  license:
    name: MIT License
    url: https://en.wikipedia.org/wiki/MIT_License
  version: '2.0'
servers:
- url: https://app.cvat.ai/api
  description: CVAT Online (hosted)
- url: http://localhost:8080/api
  description: Self-hosted CVAT (default)
security:
- tokenAuth: []
- basicAuth: []
tags:
- name: projects
  description: Annotation projects that group tasks and share a label set.
paths:
  /projects:
    get:
      operationId: projects_list
      tags:
      - projects
      summary: List projects
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - name: org
        in: query
        description: Organization slug used to filter the request.
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedProjectList'
    post:
      operationId: projects_create
      tags:
      - projects
      summary: Create a project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectWriteRequest'
      responses:
        '201':
          description: The created project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
  /projects/{id}:
    parameters:
    - $ref: '#/components/parameters/PathId'
    get:
      operationId: projects_retrieve
      tags:
      - projects
      summary: Retrieve a project
      responses:
        '200':
          description: The requested project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
    patch:
      operationId: projects_partial_update
      tags:
      - projects
      summary: Update a project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectWriteRequest'
      responses:
        '200':
          description: The updated project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
    delete:
      operationId: projects_destroy
      tags:
      - projects
      summary: Delete a project
      responses:
        '204':
          description: The project has been deleted.
components:
  schemas:
    Attribute:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        mutable:
          type: boolean
        input_type:
          type: string
          enum:
          - checkbox
          - radio
          - number
          - text
          - select
        default_value:
          type: string
        values:
          type: array
          items:
            type: string
    BasicUser:
      type: object
      nullable: true
      properties:
        id:
          type: integer
          readOnly: true
        username:
          type: string
        first_name:
          type: string
        last_name:
          type: string
    PaginatedBase:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            type: object
    ProjectWriteRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        owner_id:
          type: integer
          nullable: true
        assignee_id:
          type: integer
          nullable: true
    PaginatedProjectList:
      $ref: '#/components/schemas/PaginatedBase'
    Label:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        color:
          type: string
          description: Hex color used to render the label.
        type:
          type: string
          enum:
          - any
          - rectangle
          - polygon
          - polyline
          - points
          - ellipse
          - cuboid
          - mask
          - tag
          - skeleton
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Attribute'
        parent_id:
          type: integer
          nullable: true
    Project:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        owner:
          $ref: '#/components/schemas/BasicUser'
        assignee:
          $ref: '#/components/schemas/BasicUser'
        status:
          type: string
          enum:
          - annotation
          - validation
          - completed
        tasks_count:
          type: integer
          readOnly: true
        organization:
          type: integer
          nullable: true
        created_date:
          type: string
          format: date-time
          readOnly: true
        updated_date:
          type: string
          format: date-time
          readOnly: true
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
      description: A page number within the paginated result set.
    PathId:
      name: id
      in: path
      required: true
      schema:
        type: integer
      description: A unique integer value identifying this resource.
    PageSize:
      name: page_size
      in: query
      schema:
        type: integer
      description: Number of results to return per page.
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Token authentication. Send the header `Authorization: Token <key>` where the key is obtained from POST /auth/login.'
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication with CVAT username and password.