This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

API & SDK

How to interact with CVAT

Overview

In the modern world, it is often necessary to integrate different tools to work together. CVAT provides the following integration layers:

  • Server REST API + Swagger schema
  • Python client library (SDK)
    • REST API client
    • High-level wrappers
  • Command-line tool (CLI)

In this section, you can find documentation about each separate layer.

Component compatibility

Currently, the only supported configuration is when the server API major and minor versions are the same as SDK and CLI major and minor versions, e.g. server v2.1.* is supported by SDK and CLI v2.1.*. Different versions may have incompatibilities, which lead to some functions in SDK or CLI may not work properly.

1 - Server API

Overview

CVAT server provides HTTP REST API for interaction. Each client application - be it a command line tool, browser or a script - all interact with CVAT via HTTP requests and responses:

CVAT server interaction image

API schema

You can obtain schema for your server at <yourserver>/api/docs. For example, the official CVAT.ai application has API documentation here.

Examples

Here you can see how a task is created in CVAT:

Task creation example

  1. At first, we have to login
  2. Then we create a task from its configuration
  3. Then we send task data (images, videos etc.)
  4. We wait for data processing and finish

Design principles

Common pattern for our REST API is <VERB> [namespace] <objects> <id> <action>.

  • VERB can be POST, GET, PATCH, PUT, DELETE.
  • namespace should scope some specific functionality like auth, lambda. It is optional in the scheme.
  • Typical objects are tasks, projects, jobs.
  • When you want to extract a specific object from a collection, just specify its id.
  • An action can be used to simplify REST API or provide an endpoint for entities without objects endpoint like annotations, data, data/meta. Note: action should not duplicate other endpoints without a reason.

When you’re developing new endpoints, follow these guidelines:

  • Use nouns instead of verbs in endpoint paths. For example, POST /api/tasks instead of POST /api/tasks/create.
  • Accept and respond with JSON whenever it is possible
  • Name collections with plural nouns (e.g. /tasks, /projects)
  • Try to keep the API structure flat. Prefer two separate endpoints for /projects and /tasks instead of /projects/:id1/tasks/:id2. Use filters to extract necessary information like /tasks/:id2?project=:id1. In some cases it is useful to get all tasks. If the structure is hierarchical, it cannot be done easily. Also you have to know both :id1 and :id2 to get information about the task. Note: for now we accept GET /tasks/:id2/jobs but it should be replaced by /jobs?task=:id2 in the future.
  • Handle errors gracefully and return standard error codes (e.g. 201, 400)
  • Allow filtering, sorting, and pagination
  • Maintain good security practices
  • Cache data to improve performance
  • Versioning our APIs. It should be done when you delete an endpoint or modify its behaviors. Versioning uses a schema with Accept header with vendor media type.

2 - CVAT Python SDK

Overview

CVAT SDK is a Python library. It provides you access to Python functions and objects that simplify server interaction and provide additional functionality like data validation and serialization.

SDK API includes several layers:

  • Low-level API with REST API wrappers. Located at cvat_sdk.api_client. Read more
  • High-level API. Located at cvat_sdk.core. Read more
  • PyTorch adapter. Located at cvat_sdk.pytorch. Read more
  • Auto-annotation API. Located at cvat_sdk.auto_annotation. Read more

In general, the low-level API provides single-request operations, while the high-level one implements composite, multi-request operations, and provides local proxies for server objects. For most uses, the high-level API should be good enough, and it should be the right point to start your integration with CVAT.

The PyTorch adapter is a specialized layer that represents datasets stored in CVAT as PyTorch Dataset objects. This enables direct use of such datasets in PyTorch-based machine learning pipelines.

The auto-annotation API is a specialized layer that lets you automatically annotate CVAT datasets by running a custom function on the local machine. See also the auto-annotate command in the CLI.

Installation

To install an official release of CVAT SDK use this command:

pip install cvat-sdk

To use the cvat_sdk.masks module, request the masks extra:

pip install "cvat-sdk[masks]"

To use the PyTorch adapter or the built-in PyTorch-based auto-annotation functions, request the pytorch extra:

pip install "cvat-sdk[pytorch]"

We support Python versions 3.9 and higher.

Usage

To import package components, use the following code:

For the high-level API:

import cvat_sdk
# or
import cvat_sdk.core

For the low-level API:

import cvat_sdk.api_client

For the PyTorch adapter:

import cvat_sdk.pytorch

2.1 - SDK API Reference

2.1.1 - APIs

All URIs are relative to http://localhost

Class Method HTTP request Description
AnalyticsApi create_report POST /api/analytics/reports Create an analytics report
AnalyticsApi get_reports GET /api/analytics/reports Get an analytics report
AssetsApi create POST /api/assets Create an asset
AssetsApi destroy DELETE /api/assets/{uuid} Delete an asset
AssetsApi retrieve GET /api/assets/{uuid} Get an asset
AuthApi create_login POST /api/auth/login
AuthApi create_logout POST /api/auth/logout
AuthApi create_password_change POST /api/auth/password/change
AuthApi create_password_reset POST /api/auth/password/reset
AuthApi create_password_reset_confirm POST /api/auth/password/reset/confirm
AuthApi create_register POST /api/auth/register
AuthApi create_signing POST /api/auth/signing This method signs URL for access to the server
AuthApi retrieve_rules GET /api/auth/rules
CloudstoragesApi create POST /api/cloudstorages Create a cloud storage
CloudstoragesApi destroy DELETE /api/cloudstorages/{id} Delete a cloud storage
CloudstoragesApi list GET /api/cloudstorages List cloud storages
CloudstoragesApi partial_update PATCH /api/cloudstorages/{id} Update a cloud storage
CloudstoragesApi retrieve GET /api/cloudstorages/{id} Get cloud storage details
CloudstoragesApi retrieve_actions GET /api/cloudstorages/{id}/actions Get allowed actions for a cloud storage
CloudstoragesApi retrieve_content_v2 GET /api/cloudstorages/{id}/content-v2 Get cloud storage content
CloudstoragesApi retrieve_preview GET /api/cloudstorages/{id}/preview Get a preview image for a cloud storage
CloudstoragesApi retrieve_status GET /api/cloudstorages/{id}/status Get the status of a cloud storage
CommentsApi create POST /api/comments Create a comment
CommentsApi destroy DELETE /api/comments/{id} Delete a comment
CommentsApi list GET /api/comments List comments
CommentsApi partial_update PATCH /api/comments/{id} Update a comment
CommentsApi retrieve GET /api/comments/{id} Get comment details
EventsApi create POST /api/events Log client events
EventsApi list GET /api/events Get an event log
GuidesApi create POST /api/guides Create an annotation guide
GuidesApi destroy DELETE /api/guides/{id} Delete an annotation guide
GuidesApi partial_update PATCH /api/guides/{id} Update an annotation guide
GuidesApi retrieve GET /api/guides/{id} Get annotation guide details
InvitationsApi accept POST /api/invitations/{key}/accept Accept an invitation
InvitationsApi create POST /api/invitations Create an invitation
InvitationsApi decline POST /api/invitations/{key}/decline Decline an invitation
InvitationsApi destroy DELETE /api/invitations/{key} Delete an invitation
InvitationsApi list GET /api/invitations List invitations
InvitationsApi partial_update PATCH /api/invitations/{key} Update an invitation
InvitationsApi resend POST /api/invitations/{key}/resend Resend an invitation
InvitationsApi retrieve GET /api/invitations/{key} Get invitation details
IssuesApi create POST /api/issues Create an issue
IssuesApi destroy DELETE /api/issues/{id} Delete an issue
IssuesApi list GET /api/issues List issues
IssuesApi partial_update PATCH /api/issues/{id} Update an issue
IssuesApi retrieve GET /api/issues/{id} Get issue details
JobsApi create POST /api/jobs Create a job
JobsApi create_annotations POST /api/jobs/{id}/annotations/ Import annotations into a job
JobsApi create_dataset_export POST /api/jobs/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
JobsApi destroy DELETE /api/jobs/{id} Delete a job
JobsApi destroy_annotations DELETE /api/jobs/{id}/annotations/ Delete job annotations
JobsApi list GET /api/jobs List jobs
JobsApi partial_update PATCH /api/jobs/{id} Update a job
JobsApi partial_update_annotations PATCH /api/jobs/{id}/annotations/ Update job annotations
JobsApi partial_update_data_meta PATCH /api/jobs/{id}/data/meta Update metainformation for media files in a job
JobsApi partial_update_validation_layout PATCH /api/jobs/{id}/validation_layout Allows updating current validation configuration
JobsApi retrieve GET /api/jobs/{id} Get job details
JobsApi retrieve_annotations GET /api/jobs/{id}/annotations/ Get job annotations or export job annotations as a dataset in a specific format
JobsApi retrieve_data GET /api/jobs/{id}/data Get data of a job
JobsApi retrieve_data_meta GET /api/jobs/{id}/data/meta Get metainformation for media files in a job
JobsApi retrieve_dataset GET /api/jobs/{id}/dataset Export job as a dataset in a specific format
JobsApi retrieve_preview GET /api/jobs/{id}/preview Get a preview image for a job
JobsApi retrieve_validation_layout GET /api/jobs/{id}/validation_layout Allows getting current validation configuration
JobsApi update_annotations PUT /api/jobs/{id}/annotations/ Replace job annotations / Get annotation import status
LabelsApi destroy DELETE /api/labels/{id} Delete a label
LabelsApi list GET /api/labels List labels
LabelsApi partial_update PATCH /api/labels/{id} Update a label
LabelsApi retrieve GET /api/labels/{id} Get label details
LambdaApi create_functions POST /api/lambda/functions/{func_id}
LambdaApi create_requests POST /api/lambda/requests Method calls the function
LambdaApi delete_requests DELETE /api/lambda/requests/{id} Method cancels the request
LambdaApi list_functions GET /api/lambda/functions Method returns a list of functions
LambdaApi list_requests GET /api/lambda/requests Method returns a list of requests
LambdaApi retrieve_functions GET /api/lambda/functions/{func_id} Method returns the information about the function
LambdaApi retrieve_requests GET /api/lambda/requests/{id} Method returns the status of the request
MembershipsApi destroy DELETE /api/memberships/{id} Delete a membership
MembershipsApi list GET /api/memberships List memberships
MembershipsApi partial_update PATCH /api/memberships/{id} Update a membership
MembershipsApi retrieve GET /api/memberships/{id} Get membership details
OrganizationsApi create POST /api/organizations Create an organization
OrganizationsApi destroy DELETE /api/organizations/{id} Delete an organization
OrganizationsApi list GET /api/organizations List organizations
OrganizationsApi partial_update PATCH /api/organizations/{id} Update an organization
OrganizationsApi retrieve GET /api/organizations/{id} Get organization details
ProjectsApi create POST /api/projects Create a project
ProjectsApi create_backup POST /api/projects/backup/ Recreate a project from a backup
ProjectsApi create_backup_export POST /api/projects/{id}/backup/export Initiate process to backup resource
ProjectsApi create_dataset POST /api/projects/{id}/dataset/ Import a dataset into a project
ProjectsApi create_dataset_export POST /api/projects/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
ProjectsApi destroy DELETE /api/projects/{id} Delete a project
ProjectsApi list GET /api/projects List projects
ProjectsApi partial_update PATCH /api/projects/{id} Update a project
ProjectsApi retrieve GET /api/projects/{id} Get project details
ProjectsApi retrieve_annotations GET /api/projects/{id}/annotations Export project annotations as a dataset
ProjectsApi retrieve_backup GET /api/projects/{id}/backup Back up a project
ProjectsApi retrieve_dataset GET /api/projects/{id}/dataset/ Export a project as a dataset / Check dataset import status
ProjectsApi retrieve_preview GET /api/projects/{id}/preview Get a preview image for a project
QualityApi create_report POST /api/quality/reports Create a quality report
QualityApi list_conflicts GET /api/quality/conflicts List annotation conflicts in a quality report
QualityApi list_reports GET /api/quality/reports List quality reports
QualityApi list_settings GET /api/quality/settings List quality settings instances
QualityApi partial_update_settings PATCH /api/quality/settings/{id} Update a quality settings instance
QualityApi retrieve_report GET /api/quality/reports/{id} Get quality report details
QualityApi retrieve_report_data GET /api/quality/reports/{id}/data Get quality report contents
QualityApi retrieve_settings GET /api/quality/settings/{id} Get quality settings instance details
RequestsApi create_cancel POST /api/requests/{id}/cancel Cancel request
RequestsApi list GET /api/requests List requests
RequestsApi retrieve GET /api/requests/{id} Get request details
SchemaApi retrieve GET /api/schema/
ServerApi list_share GET /api/server/share List files/directories in the mounted share
ServerApi retrieve_about GET /api/server/about Get basic CVAT information
ServerApi retrieve_annotation_formats GET /api/server/annotation/formats Get supported annotation formats
ServerApi retrieve_plugins GET /api/server/plugins Get enabled plugins
TasksApi create POST /api/tasks Create a task
TasksApi create_annotations POST /api/tasks/{id}/annotations/ Import annotations into a task
TasksApi create_backup POST /api/tasks/backup/ Recreate a task from a backup
TasksApi create_backup_export POST /api/tasks/{id}/backup/export Initiate process to backup resource
TasksApi create_data POST /api/tasks/{id}/data/ Attach data to a task
TasksApi create_dataset_export POST /api/tasks/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
TasksApi destroy DELETE /api/tasks/{id} Delete a task
TasksApi destroy_annotations DELETE /api/tasks/{id}/annotations/ Delete task annotations
TasksApi list GET /api/tasks List tasks
TasksApi partial_update PATCH /api/tasks/{id} Update a task
TasksApi partial_update_annotations PATCH /api/tasks/{id}/annotations/ Update task annotations
TasksApi partial_update_data_meta PATCH /api/tasks/{id}/data/meta Update metainformation for media files in a task
TasksApi partial_update_validation_layout PATCH /api/tasks/{id}/validation_layout Allows updating current validation configuration
TasksApi retrieve GET /api/tasks/{id} Get task details
TasksApi retrieve_annotations GET /api/tasks/{id}/annotations/ Get task annotations or export them as a dataset in a specific format
TasksApi retrieve_backup GET /api/tasks/{id}/backup Back up a task
TasksApi retrieve_data GET /api/tasks/{id}/data/ Get data of a task
TasksApi retrieve_data_meta GET /api/tasks/{id}/data/meta Get metainformation for media files in a task
TasksApi retrieve_dataset GET /api/tasks/{id}/dataset Export task as a dataset in a specific format
TasksApi retrieve_preview GET /api/tasks/{id}/preview Get a preview image for a task
TasksApi retrieve_status GET /api/tasks/{id}/status Get the creation status of a task
TasksApi retrieve_validation_layout GET /api/tasks/{id}/validation_layout Allows getting current validation configuration
TasksApi update_annotations PUT /api/tasks/{id}/annotations/ Replace task annotations / Get annotation import status
UsersApi destroy DELETE /api/users/{id} Delete a user
UsersApi list GET /api/users List users
UsersApi partial_update PATCH /api/users/{id} Update a user
UsersApi retrieve GET /api/users/{id} Get user details
UsersApi retrieve_self GET /api/users/self Get details of the current user
WebhooksApi create POST /api/webhooks Create a webhook
WebhooksApi create_deliveries_redelivery POST /api/webhooks/{id}/deliveries/{delivery_id}/redelivery Redeliver a webhook delivery
WebhooksApi create_ping POST /api/webhooks/{id}/ping Send a ping webhook
WebhooksApi destroy DELETE /api/webhooks/{id} Delete a webhook
WebhooksApi list GET /api/webhooks List webhooks
WebhooksApi list_deliveries GET /api/webhooks/{id}/deliveries List deliveries for a webhook
WebhooksApi partial_update PATCH /api/webhooks/{id} Update a webhook
WebhooksApi retrieve GET /api/webhooks/{id} Get webhook details
WebhooksApi retrieve_deliveries GET /api/webhooks/{id}/deliveries/{delivery_id} Get details of a webhook delivery
WebhooksApi retrieve_events GET /api/webhooks/events List available webhook events
WebhooksApi update PUT /api/webhooks/{id} Replace a webhook

2.1.1.1 - AnalyticsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_report POST /api/analytics/reports Create an analytics report
get_reports GET /api/analytics/reports Get an analytics report

create_report

create_report( rq_id=None, analytics_report_create_request=None, **kwargs )

Create an analytics report

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    rq_id = "rq_id_example" # str | The report creation request id. Can be specified to check the report creation status.  (optional)
    analytics_report_create_request = AnalyticsReportCreateRequest(
        job_id=1,
        task_id=1,
        project_id=1,
    ) # AnalyticsReportCreateRequest |  (optional)

    try:
        api_client.analytics_api.create_report(
            rq_id=rq_id,
            analytics_report_create_request=analytics_report_create_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling AnalyticsApi.create_report(): %s\n" % e)

Parameters

Name Type Description Notes
rq_id str The report creation request id. Can be specified to check the report creation status. [optional]
analytics_report_create_request AnalyticsReportCreateRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 A analytics report request has been computed -
202 A analytics report request has been enqueued, the request id is returned. The request status can be checked at this endpoint by passing the rq_id as the query parameter. If the request id is specified, this response means the analytics report request is queued or is being processed. -
400 Invalid or failed request, check the response data for details -

get_reports

get_reports( end_date=None, job_id=None, project_id=None, start_date=None, task_id=None, **kwargs )

Get an analytics report

Receive analytics report

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Specify the end date for filtering report data. (optional)
    job_id = 1 # int | Specify job ID (optional)
    project_id = 1 # int | Specify project ID (optional)
    start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Specify a start date for filtering report data. (optional)
    task_id = 1 # int | Specify task ID (optional)

    try:
        (data, response) = api_client.analytics_api.get_reports(
            end_date=end_date,
            job_id=job_id,
            project_id=project_id,
            start_date=start_date,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AnalyticsApi.get_reports(): %s\n" % e)

Parameters

Name Type Description Notes
end_date datetime Specify the end date for filtering report data. [optional]
job_id int Specify job ID [optional]
project_id int Specify project ID [optional]
start_date datetime Specify a start date for filtering report data. [optional]
task_id int Specify task ID [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnalyticsReport, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -
404 Not found -

2.1.1.2 - AssetsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/assets Create an asset
destroy DELETE /api/assets/{uuid} Delete an asset
retrieve GET /api/assets/{uuid} Get an asset

create

create( file=None, **kwargs )

Create an asset

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    file = open('/path/to/file', 'rb') # file_type |  (optional)

    try:
        (data, response) = api_client.assets_api.create(
            file=file,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AssetsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
file file_type [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AssetRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( uuid, **kwargs )

Delete an asset

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    uuid = "uuid_example" # str | A UUID string identifying this asset.

    try:
        api_client.assets_api.destroy(
            uuid,)
    except exceptions.ApiException as e:
        print("Exception when calling AssetsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
uuid str A UUID string identifying this asset.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The asset has been deleted -

retrieve

retrieve( uuid, **kwargs )

Get an asset

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    uuid = "uuid_example" # str | A UUID string identifying this asset.

    try:
        api_client.assets_api.retrieve(
            uuid,)
    except exceptions.ApiException as e:
        print("Exception when calling AssetsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
uuid str A UUID string identifying this asset.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Asset file -

2.1.1.3 - AuthApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_login POST /api/auth/login
create_logout POST /api/auth/logout
create_password_change POST /api/auth/password/change
create_password_reset POST /api/auth/password/reset
create_password_reset_confirm POST /api/auth/password/reset/confirm
create_register POST /api/auth/register
create_signing POST /api/auth/signing This method signs URL for access to the server
retrieve_rules GET /api/auth/rules

create_login

create_login( login_serializer_ex_request, **kwargs )

Check the credentials and return the REST Token if the credentials are valid and authenticated. If email verification is enabled and the user has the unverified email, an email with a confirmation link will be sent. Calls Django Auth login method to register User ID in Django session framework. Accept the following POST parameters: username, email, password Return the REST Framework Token Object’s key.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    login_serializer_ex_request = LoginSerializerExRequest(
        username="username_example",
        email="email_example",
        password="password_example",
    ) # LoginSerializerExRequest | 

    try:
        (data, response) = api_client.auth_api.create_login(
            login_serializer_ex_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_login(): %s\n" % e)

Parameters

Name Type Description Notes
login_serializer_ex_request LoginSerializerExRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Token, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create_logout

create_logout( **kwargs )

Calls Django logout method and delete the Token object assigned to the current User object. Accepts/Returns nothing.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.auth_api.create_logout()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_logout(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RestAuthDetail, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create_password_change

create_password_change( password_change_request, **kwargs )

Calls Django Auth SetPasswordForm save method. Accepts the following POST parameters: new_password1, new_password2 Returns the success/fail message.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    password_change_request = PasswordChangeRequest(
        old_password="old_password_example",
        new_password1="new_password1_example",
        new_password2="new_password2_example",
    ) # PasswordChangeRequest | 

    try:
        (data, response) = api_client.auth_api.create_password_change(
            password_change_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_password_change(): %s\n" % e)

Parameters

Name Type Description Notes
password_change_request PasswordChangeRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RestAuthDetail, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create_password_reset

create_password_reset( password_reset_serializer_ex_request, **kwargs )

Calls Django Auth PasswordResetForm save method. Accepts the following POST parameters: email Returns the success/fail message.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    password_reset_serializer_ex_request = PasswordResetSerializerExRequest(
        email="email_example",
    ) # PasswordResetSerializerExRequest | 

    try:
        (data, response) = api_client.auth_api.create_password_reset(
            password_reset_serializer_ex_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_password_reset(): %s\n" % e)

Parameters

Name Type Description Notes
password_reset_serializer_ex_request PasswordResetSerializerExRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RestAuthDetail, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create_password_reset_confirm

create_password_reset_confirm( password_reset_confirm_request, **kwargs )

Password reset e-mail link is confirmed, therefore this resets the user’s password. Accepts the following POST parameters: token, uid, new_password1, new_password2 Returns the success/fail message.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    password_reset_confirm_request = PasswordResetConfirmRequest(
        new_password1="new_password1_example",
        new_password2="new_password2_example",
        uid="uid_example",
        token="token_example",
    ) # PasswordResetConfirmRequest | 

    try:
        (data, response) = api_client.auth_api.create_password_reset_confirm(
            password_reset_confirm_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_password_reset_confirm(): %s\n" % e)

Parameters

Name Type Description Notes
password_reset_confirm_request PasswordResetConfirmRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RestAuthDetail, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create_register

create_register( register_serializer_ex_request, **kwargs )

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    register_serializer_ex_request = RegisterSerializerExRequest(
        username="username_example",
        email="email_example",
        password1="password1_example",
        password2="password2_example",
        first_name="first_name_example",
        last_name="last_name_example",
    ) # RegisterSerializerExRequest | 

    try:
        (data, response) = api_client.auth_api.create_register(
            register_serializer_ex_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_register(): %s\n" % e)

Parameters

Name Type Description Notes
register_serializer_ex_request RegisterSerializerExRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RegisterSerializerEx, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_signing

create_signing( signing_request, **kwargs )

This method signs URL for access to the server

Signed URL contains a token which authenticates a user on the server.Signed URL is valid during 30 seconds since signing.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    signing_request = SigningRequest(
        url="url_example",
    ) # SigningRequest | 

    try:
        (data, response) = api_client.auth_api.create_signing(
            signing_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.create_signing(): %s\n" % e)

Parameters

Name Type Description Notes
signing_request SigningRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[str, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 text URL -

retrieve_rules

retrieve_rules( **kwargs )

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",)

with ApiClient(configuration) as api_client:

    try:
        api_client.auth_api.retrieve_rules()
    except exceptions.ApiException as e:
        print("Exception when calling AuthApi.retrieve_rules(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

No authentication required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 No response body -

2.1.1.4 - CloudstoragesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/cloudstorages Create a cloud storage
destroy DELETE /api/cloudstorages/{id} Delete a cloud storage
list GET /api/cloudstorages List cloud storages
partial_update PATCH /api/cloudstorages/{id} Update a cloud storage
retrieve GET /api/cloudstorages/{id} Get cloud storage details
retrieve_actions GET /api/cloudstorages/{id}/actions Get allowed actions for a cloud storage
retrieve_content_v2 GET /api/cloudstorages/{id}/content-v2 Get cloud storage content
retrieve_preview GET /api/cloudstorages/{id}/preview Get a preview image for a cloud storage
retrieve_status GET /api/cloudstorages/{id}/status Get the status of a cloud storage

create

create( cloud_storage_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create a cloud storage

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    cloud_storage_write_request = CloudStorageWriteRequest(
        provider_type=ProviderTypeEnum("AWS_S3_BUCKET"),
        resource="resource_example",
        display_name="display_name_example",
        owner=BasicUserRequest(
            username="A",
            first_name="first_name_example",
            last_name="last_name_example",
        ),
        credentials_type=CredentialsTypeEnum("KEY_SECRET_KEY_PAIR"),
        session_token="session_token_example",
        account_name="account_name_example",
        key="key_example",
        secret_key="secret_key_example",
        connection_string="connection_string_example",
        key_file=open('/path/to/file', 'rb'),
        specific_attributes="specific_attributes_example",
        description="description_example",
        manifests=[],
    ) # CloudStorageWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.cloudstorages_api.create(
            cloud_storage_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
cloud_storage_write_request CloudStorageWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CloudStorageRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Delete a cloud storage

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.

    try:
        api_client.cloudstorages_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The cloud storage has been removed -

list

list( x_organization=None, credentials_type=None, filter=None, name=None, org=None, org_id=None, owner=None, page=None, page_size=None, provider_type=None, resource=None, search=None, sort=None, **kwargs )

List cloud storages

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    credentials_type = "KEY_SECRET_KEY_PAIR" # str | A simple equality filter for the credentials_type field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['provider_type', 'name', 'resource', 'credentials_type', 'owner', 'description', 'id']. (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    provider_type = "AWS_S3_BUCKET" # str | A simple equality filter for the provider_type field (optional)
    resource = "resource_example" # str | A simple equality filter for the resource field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('provider_type', 'name', 'resource', 'credentials_type', 'owner', 'description') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['provider_type', 'name', 'resource', 'credentials_type', 'owner', 'description', 'id'] (optional)

    try:
        (data, response) = api_client.cloudstorages_api.list(
            x_organization=x_organization,
            credentials_type=credentials_type,
            filter=filter,
            name=name,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            provider_type=provider_type,
            resource=resource,
            search=search,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
credentials_type str A simple equality filter for the credentials_type field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘provider_type’, ’name’, ‘resource’, ‘credentials_type’, ‘owner’, ‘description’, ‘id’]. [optional]
name str A simple equality filter for the name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
provider_type str A simple equality filter for the provider_type field [optional]
resource str A simple equality filter for the resource field [optional]
search str A search term. Available search_fields: (‘provider_type’, ’name’, ‘resource’, ‘credentials_type’, ‘owner’, ‘description’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘provider_type’, ’name’, ‘resource’, ‘credentials_type’, ‘owner’, ‘description’, ‘id’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedCloudStorageReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_cloud_storage_write_request=None, **kwargs )

Update a cloud storage

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.
    patched_cloud_storage_write_request = PatchedCloudStorageWriteRequest(
        provider_type=ProviderTypeEnum("AWS_S3_BUCKET"),
        resource="resource_example",
        display_name="display_name_example",
        owner=BasicUserRequest(
            username="A",
            first_name="first_name_example",
            last_name="last_name_example",
        ),
        credentials_type=CredentialsTypeEnum("KEY_SECRET_KEY_PAIR"),
        session_token="session_token_example",
        account_name="account_name_example",
        key="key_example",
        secret_key="secret_key_example",
        connection_string="connection_string_example",
        key_file=open('/path/to/file', 'rb'),
        specific_attributes="specific_attributes_example",
        description="description_example",
        manifests=[],
    ) # PatchedCloudStorageWriteRequest |  (optional)

    try:
        (data, response) = api_client.cloudstorages_api.partial_update(
            id,
            patched_cloud_storage_write_request=patched_cloud_storage_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.
patched_cloud_storage_write_request PatchedCloudStorageWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CloudStorageRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get cloud storage details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.

    try:
        (data, response) = api_client.cloudstorages_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CloudStorageRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_actions

retrieve_actions( id, **kwargs )

Get allowed actions for a cloud storage

Method return allowed actions for cloud storage. It’s required for reading/writing

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.

    try:
        (data, response) = api_client.cloudstorages_api.retrieve_actions(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.retrieve_actions(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[str, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Cloud Storage actions (GET PUT

retrieve_content_v2

retrieve_content_v2( id, manifest_path=None, next_token=None, page_size=None, prefix=None, **kwargs )

Get cloud storage content

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.
    manifest_path = "manifest_path_example" # str | Path to the manifest file in a cloud storage (optional)
    next_token = "next_token_example" # str | Used to continue listing files in the bucket (optional)
    page_size = 1 # int |  (optional)
    prefix = "prefix_example" # str | Prefix to filter data (optional)

    try:
        (data, response) = api_client.cloudstorages_api.retrieve_content_v2(
            id,
            manifest_path=manifest_path,
            next_token=next_token,
            page_size=page_size,
            prefix=prefix,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.retrieve_content_v2(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.
manifest_path str Path to the manifest file in a cloud storage [optional]
next_token str Used to continue listing files in the bucket [optional]
page_size int [optional]
prefix str Prefix to filter data [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CloudStorageContent, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 A manifest content -

retrieve_preview

retrieve_preview( id, **kwargs )

Get a preview image for a cloud storage

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.

    try:
        api_client.cloudstorages_api.retrieve_preview(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.retrieve_preview(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Cloud Storage preview -
400 Failed to get cloud storage preview -
404 Cloud Storage preview not found -

retrieve_status

retrieve_status( id, **kwargs )

Get the status of a cloud storage

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this cloud storage.

    try:
        (data, response) = api_client.cloudstorages_api.retrieve_status(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CloudstoragesApi.retrieve_status(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this cloud storage.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[str, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Cloud Storage status (AVAILABLE NOT_FOUND

2.1.1.5 - CommentsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/comments Create a comment
destroy DELETE /api/comments/{id} Delete a comment
list GET /api/comments List comments
partial_update PATCH /api/comments/{id} Update a comment
retrieve GET /api/comments/{id} Get comment details

create

create( comment_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create a comment

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    comment_write_request = CommentWriteRequest(
        issue=1,
        message="message_example",
    ) # CommentWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.comments_api.create(
            comment_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CommentsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
comment_write_request CommentWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CommentRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Delete a comment

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this comment.

    try:
        api_client.comments_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling CommentsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this comment.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The comment has been deleted -

list

list( x_organization=None, filter=None, frame_id=None, issue_id=None, job_id=None, org=None, org_id=None, owner=None, page=None, page_size=None, search=None, sort=None, **kwargs )

List comments

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['owner', 'id', 'issue_id', 'frame_id', 'job_id']. (optional)
    frame_id = 1 # int | A simple equality filter for the frame_id field (optional)
    issue_id = 1 # int | A simple equality filter for the issue_id field (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('owner',) (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['owner', 'id', 'issue_id', 'frame_id', 'job_id'] (optional)

    try:
        (data, response) = api_client.comments_api.list(
            x_organization=x_organization,
            filter=filter,
            frame_id=frame_id,
            issue_id=issue_id,
            job_id=job_id,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CommentsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘owner’, ‘id’, ‘issue_id’, ‘frame_id’, ‘job_id’]. [optional]
frame_id int A simple equality filter for the frame_id field [optional]
issue_id int A simple equality filter for the issue_id field [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘owner’,) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘owner’, ‘id’, ‘issue_id’, ‘frame_id’, ‘job_id’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedCommentReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_comment_write_request=None, **kwargs )

Update a comment

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this comment.
    patched_comment_write_request = PatchedCommentWriteRequest(
        message="message_example",
    ) # PatchedCommentWriteRequest |  (optional)

    try:
        (data, response) = api_client.comments_api.partial_update(
            id,
            patched_comment_write_request=patched_comment_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CommentsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this comment.
patched_comment_write_request PatchedCommentWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CommentRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get comment details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this comment.

    try:
        (data, response) = api_client.comments_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling CommentsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this comment.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[CommentRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.6 - EventsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/events Log client events
list GET /api/events Get an event log

create

create( client_events_request, x_organization=None, org=None, org_id=None, **kwargs )

Log client events

Sends logs to the Clickhouse if it is connected

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    client_events_request = ClientEventsRequest(
        events=[
            EventRequest(
                scope="scope_example",
                obj_name="obj_name_example",
                obj_id=1,
                obj_val="obj_val_example",
                source="source_example",
                timestamp=dateutil_parser('1970-01-01T00:00:00.00Z'),
                count=1,
                duration=0,
                project_id=1,
                task_id=1,
                job_id=1,
                user_id=1,
                user_name="user_name_example",
                user_email="user_email_example",
                org_id=1,
                org_slug="org_slug_example",
                payload="payload_example",
            ),
        ],
        previous_event=ClientEventsRequestPreviousEvent(None),
        timestamp=dateutil_parser('1970-01-01T00:00:00.00Z'),
    ) # ClientEventsRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.events_api.create(
            client_events_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling EventsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
client_events_request ClientEventsRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ClientEvents, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

list

list( action=None, filename=None, _from=None, job_id=None, org_id=None, project_id=None, query_id=None, task_id=None, to=None, user_id=None, **kwargs )

Get an event log

The log is returned in the CSV format.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    action = "download" # str | Used to start downloading process after annotation file had been created (optional) if omitted the server will use the default value of "download"
    filename = "filename_example" # str | Desired output file name (optional)
    _from = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Filter events after the datetime. If no 'from' or 'to' parameters are passed, the last 30 days will be set. (optional)
    job_id = 1 # int | Filter events by job ID (optional)
    org_id = 1 # int | Filter events by organization ID (optional)
    project_id = 1 # int | Filter events by project ID (optional)
    query_id = "query_id_example" # str | ID of query request that need to check or download (optional)
    task_id = 1 # int | Filter events by task ID (optional)
    to = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Filter events before the datetime. If no 'from' or 'to' parameters are passed, the last 30 days will be set. (optional)
    user_id = 1 # int | Filter events by user ID (optional)

    try:
        api_client.events_api.list(
            action=action,
            filename=filename,
            _from=_from,
            job_id=job_id,
            org_id=org_id,
            project_id=project_id,
            query_id=query_id,
            task_id=task_id,
            to=to,
            user_id=user_id,
        )
    except exceptions.ApiException as e:
        print("Exception when calling EventsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
action str Used to start downloading process after annotation file had been created [optional] if omitted the server will use the default value of “download”
filename str Desired output file name [optional]
_from datetime Filter events after the datetime. If no ‘from’ or ’to’ parameters are passed, the last 30 days will be set. [optional]
job_id int Filter events by job ID [optional]
org_id int Filter events by organization ID [optional]
project_id int Filter events by project ID [optional]
query_id str ID of query request that need to check or download [optional]
task_id int Filter events by task ID [optional]
to datetime Filter events before the datetime. If no ‘from’ or ’to’ parameters are passed, the last 30 days will be set. [optional]
user_id int Filter events by user ID [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Download of file started -
201 CSV log file is ready for downloading -
202 Creating a CSV log file has been started -

2.1.1.7 - GuidesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/guides Create an annotation guide
destroy DELETE /api/guides/{id} Delete an annotation guide
partial_update PATCH /api/guides/{id} Update an annotation guide
retrieve GET /api/guides/{id} Get annotation guide details

create

create( annotation_guide_write_request=None, **kwargs )

Create an annotation guide

The new guide will be bound either to a project or a task, depending on parameters.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    annotation_guide_write_request = AnnotationGuideWriteRequest(
        task_id=1,
        project_id=1,
        markdown="markdown_example",
    ) # AnnotationGuideWriteRequest |  (optional)

    try:
        (data, response) = api_client.guides_api.create(
            annotation_guide_write_request=annotation_guide_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling GuidesApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
annotation_guide_write_request AnnotationGuideWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationGuideRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Delete an annotation guide

This also deletes all assets attached to the guide.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this annotation guide.

    try:
        api_client.guides_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling GuidesApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this annotation guide.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The annotation guide has been deleted -

partial_update

partial_update( id, patched_annotation_guide_write_request=None, **kwargs )

Update an annotation guide

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this annotation guide.
    patched_annotation_guide_write_request = PatchedAnnotationGuideWriteRequest(
        task_id=1,
        project_id=1,
        markdown="markdown_example",
    ) # PatchedAnnotationGuideWriteRequest |  (optional)

    try:
        (data, response) = api_client.guides_api.partial_update(
            id,
            patched_annotation_guide_write_request=patched_annotation_guide_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling GuidesApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this annotation guide.
patched_annotation_guide_write_request PatchedAnnotationGuideWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationGuideRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get annotation guide details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this annotation guide.

    try:
        (data, response) = api_client.guides_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling GuidesApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this annotation guide.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationGuideRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.8 - InvitationsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
accept POST /api/invitations/{key}/accept Accept an invitation
create POST /api/invitations Create an invitation
decline POST /api/invitations/{key}/decline Decline an invitation
destroy DELETE /api/invitations/{key} Delete an invitation
list GET /api/invitations List invitations
partial_update PATCH /api/invitations/{key} Update an invitation
resend POST /api/invitations/{key}/resend Resend an invitation
retrieve GET /api/invitations/{key} Get invitation details

accept

accept( key, **kwargs )

Accept an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        (data, response) = api_client.invitations_api.accept(
            key,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.accept(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AcceptInvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 The invitation is accepted -
400 The invitation is expired or already accepted -

create

create( invitation_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    invitation_write_request = InvitationWriteRequest(
        role=RoleEnum("worker"),
        email="email_example",
    ) # InvitationWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.invitations_api.create(
            invitation_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
invitation_write_request InvitationWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

decline

decline( key, **kwargs )

Decline an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.decline(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.decline(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The invitation has been declined -

destroy

destroy( key, **kwargs )

Delete an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.destroy(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The invitation has been deleted -

list

list( x_organization=None, filter=None, org=None, org_id=None, owner=None, page=None, page_size=None, search=None, sort=None, **kwargs )

List invitations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['owner', 'user_id', 'accepted']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('owner',) (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['owner', 'created_date'] (optional)

    try:
        (data, response) = api_client.invitations_api.list(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘owner’, ‘user_id’, ‘accepted’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘owner’,) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘owner’, ‘created_date’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedInvitationReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( key, patched_invitation_write_request=None, **kwargs )

Update an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.
    patched_invitation_write_request = PatchedInvitationWriteRequest(
        role=RoleEnum("worker"),
        email="email_example",
    ) # PatchedInvitationWriteRequest |  (optional)

    try:
        (data, response) = api_client.invitations_api.partial_update(
            key,
            patched_invitation_write_request=patched_invitation_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.
patched_invitation_write_request PatchedInvitationWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

resend

resend( key, **kwargs )

Resend an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.resend(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.resend(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Invitation has been sent -
400 The invitation is already accepted -

retrieve

retrieve( key, **kwargs )

Get invitation details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        (data, response) = api_client.invitations_api.retrieve(
            key,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.9 - IssuesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/issues Create an issue
destroy DELETE /api/issues/{id} Delete an issue
list GET /api/issues List issues
partial_update PATCH /api/issues/{id} Update an issue
retrieve GET /api/issues/{id} Get issue details

create

create( issue_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create an issue

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    issue_write_request = IssueWriteRequest(
        frame=0,
        position=[
            3.14,
        ],
        job=1,
        assignee=1,
        message="message_example",
        resolved=True,
    ) # IssueWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.issues_api.create(
            issue_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling IssuesApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
issue_write_request IssueWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[IssueRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Delete an issue

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this issue.

    try:
        api_client.issues_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling IssuesApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this issue.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The issue has been deleted -

list

list( x_organization=None, assignee=None, filter=None, frame_id=None, job_id=None, org=None, org_id=None, owner=None, page=None, page_size=None, resolved=None, search=None, sort=None, task_id=None, **kwargs )

List issues

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    assignee = "assignee_example" # str | A simple equality filter for the assignee field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['owner', 'assignee', 'id', 'job_id', 'task_id', 'resolved', 'frame_id']. (optional)
    frame_id = 1 # int | A simple equality filter for the frame_id field (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    resolved = True # bool | A simple equality filter for the resolved field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('owner', 'assignee') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['owner', 'assignee', 'id', 'job_id', 'task_id', 'resolved', 'frame_id'] (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)

    try:
        (data, response) = api_client.issues_api.list(
            x_organization=x_organization,
            assignee=assignee,
            filter=filter,
            frame_id=frame_id,
            job_id=job_id,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            resolved=resolved,
            search=search,
            sort=sort,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling IssuesApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
assignee str A simple equality filter for the assignee field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘owner’, ‘assignee’, ‘id’, ‘job_id’, ’task_id’, ‘resolved’, ‘frame_id’]. [optional]
frame_id int A simple equality filter for the frame_id field [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
resolved bool A simple equality filter for the resolved field [optional]
search str A search term. Available search_fields: (‘owner’, ‘assignee’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘owner’, ‘assignee’, ‘id’, ‘job_id’, ’task_id’, ‘resolved’, ‘frame_id’] [optional]
task_id int A simple equality filter for the task_id field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedIssueReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_issue_write_request=None, **kwargs )

Update an issue

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this issue.
    patched_issue_write_request = PatchedIssueWriteRequest(
        position=[
            3.14,
        ],
        assignee=1,
        resolved=True,
    ) # PatchedIssueWriteRequest |  (optional)

    try:
        (data, response) = api_client.issues_api.partial_update(
            id,
            patched_issue_write_request=patched_issue_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling IssuesApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this issue.
patched_issue_write_request PatchedIssueWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[IssueRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get issue details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this issue.

    try:
        (data, response) = api_client.issues_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling IssuesApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this issue.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[IssueRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.10 - JobsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/jobs Create a job
create_annotations POST /api/jobs/{id}/annotations/ Import annotations into a job
create_dataset_export POST /api/jobs/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
destroy DELETE /api/jobs/{id} Delete a job
destroy_annotations DELETE /api/jobs/{id}/annotations/ Delete job annotations
list GET /api/jobs List jobs
partial_update PATCH /api/jobs/{id} Update a job
partial_update_annotations PATCH /api/jobs/{id}/annotations/ Update job annotations
partial_update_data_meta PATCH /api/jobs/{id}/data/meta Update metainformation for media files in a job
partial_update_validation_layout PATCH /api/jobs/{id}/validation_layout Allows updating current validation configuration
retrieve GET /api/jobs/{id} Get job details
retrieve_annotations GET /api/jobs/{id}/annotations/ Get job annotations or export job annotations as a dataset in a specific format
retrieve_data GET /api/jobs/{id}/data Get data of a job
retrieve_data_meta GET /api/jobs/{id}/data/meta Get metainformation for media files in a job
retrieve_dataset GET /api/jobs/{id}/dataset Export job as a dataset in a specific format
retrieve_preview GET /api/jobs/{id}/preview Get a preview image for a job
retrieve_validation_layout GET /api/jobs/{id}/validation_layout Allows getting current validation configuration
update_annotations PUT /api/jobs/{id}/annotations/ Replace job annotations / Get annotation import status

create

create( job_write_request, **kwargs )

Create a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    job_write_request = JobWriteRequest(
        assignee=1,
        stage=JobStage("annotation"),
        state=OperationStatus("new"),
        type=JobType("annotation"),
        task_id=1,
        frame_selection_method=FrameSelectionMethod("random_uniform"),
        frame_count=1,
        frame_share=3.14,
        frames_per_job_count=1,
        frames_per_job_share=3.14,
        random_seed=0,
        seed=0,
        frames=[
            0,
        ],
    ) # JobWriteRequest | 

    try:
        (data, response) = api_client.jobs_api.create(
            job_write_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
job_write_request JobWriteRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[JobRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_annotations

create_annotations( id, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, annotation_file_request=None, **kwargs )

Import annotations into a job

The request POST /api/jobs/id/annotations will initiate the import and will create the rq job on the server in which the import will be carried out. Please, use the PUT /api/jobs/id/annotations endpoint for checking status of the process.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Annotation file name (optional)
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | where to import the annotation from (optional)
    use_default_location = True # bool | Use the location that was configured in the task to import annotation (optional) if omitted the server will use the default value of True
    annotation_file_request = AnnotationFileRequest(
        annotation_file=open('/path/to/file', 'rb'),
    ) # AnnotationFileRequest |  (optional)

    try:
        api_client.jobs_api.create_annotations(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
            annotation_file_request=annotation_file_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.create_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
cloud_storage_id int Storage id [optional]
filename str Annotation file name [optional]
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str where to import the annotation from [optional]
use_default_location bool Use the location that was configured in the task to import annotation [optional] if omitted the server will use the default value of True
annotation_file_request AnnotationFileRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 Uploading has finished -
202 Uploading has been started -
405 Format is not available -

create_dataset_export

create_dataset_export( format, id, cloud_storage_id=None, filename=None, location=None, save_images=None, **kwargs )

Initialize process to export resource as a dataset in a specific format

The request POST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, use GET /api/requests/<rq_id> where rq_id is request ID returned in the response for this endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this job.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    save_images = False # bool | Include images or not (optional) if omitted the server will use the default value of False

    try:
        (data, response) = api_client.jobs_api.create_dataset_export(
            format,
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            save_images=save_images,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.create_dataset_export(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this job.
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
save_images bool Include images or not [optional] if omitted the server will use the default value of False

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Exporting has been started -
405 Format is not available -
409 Exporting is already in progress -

destroy

destroy( id, **kwargs )

Delete a job

Related annotations will be deleted as well. Please note, that not every job can be removed. Currently, it is only available for Ground Truth jobs.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        api_client.jobs_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The job has been deleted -

destroy_annotations

destroy_annotations( id, **kwargs )

Delete job annotations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        api_client.jobs_api.destroy_annotations(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.destroy_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The annotation has been deleted -

list

list( x_organization=None, assignee=None, dimension=None, filter=None, org=None, org_id=None, page=None, page_size=None, project_id=None, project_name=None, search=None, sort=None, stage=None, state=None, task_id=None, task_name=None, type=None, **kwargs )

List jobs

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    assignee = "assignee_example" # str | A simple equality filter for the assignee field (optional)
    dimension = "3d" # str | A simple equality filter for the dimension field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['task_name', 'project_name', 'assignee', 'state', 'stage', 'id', 'task_id', 'project_id', 'updated_date', 'dimension', 'type']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    project_id = 1 # int | A simple equality filter for the project_id field (optional)
    project_name = "project_name_example" # str | A simple equality filter for the project_name field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('task_name', 'project_name', 'assignee', 'state', 'stage') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['task_name', 'project_name', 'assignee', 'state', 'stage', 'id', 'task_id', 'project_id', 'updated_date', 'dimension', 'type'] (optional)
    stage = "annotation" # str | A simple equality filter for the stage field (optional)
    state = "new" # str | A simple equality filter for the state field (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)
    task_name = "task_name_example" # str | A simple equality filter for the task_name field (optional)
    type = "annotation" # str | A simple equality filter for the type field (optional)

    try:
        (data, response) = api_client.jobs_api.list(
            x_organization=x_organization,
            assignee=assignee,
            dimension=dimension,
            filter=filter,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            project_id=project_id,
            project_name=project_name,
            search=search,
            sort=sort,
            stage=stage,
            state=state,
            task_id=task_id,
            task_name=task_name,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
assignee str A simple equality filter for the assignee field [optional]
dimension str A simple equality filter for the dimension field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [’task_name’, ‘project_name’, ‘assignee’, ‘state’, ‘stage’, ‘id’, ’task_id’, ‘project_id’, ‘updated_date’, ‘dimension’, ’type’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
project_id int A simple equality filter for the project_id field [optional]
project_name str A simple equality filter for the project_name field [optional]
search str A search term. Available search_fields: (’task_name’, ‘project_name’, ‘assignee’, ‘state’, ‘stage’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [’task_name’, ‘project_name’, ‘assignee’, ‘state’, ‘stage’, ‘id’, ’task_id’, ‘project_id’, ‘updated_date’, ‘dimension’, ’type’] [optional]
stage str A simple equality filter for the stage field [optional]
state str A simple equality filter for the state field [optional]
task_id int A simple equality filter for the task_id field [optional]
task_name str A simple equality filter for the task_name field [optional]
type str A simple equality filter for the type field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedJobReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_job_write_request=None, **kwargs )

Update a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    patched_job_write_request = PatchedJobWriteRequest(
        assignee=1,
        stage=JobStage("annotation"),
        state=OperationStatus("new"),
    ) # PatchedJobWriteRequest |  (optional)

    try:
        (data, response) = api_client.jobs_api.partial_update(
            id,
            patched_job_write_request=patched_job_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
patched_job_write_request PatchedJobWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[JobRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_annotations

partial_update_annotations( action, id, patched_labeled_data_request=None, **kwargs )

Update job annotations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    action = "create" # str | 
    id = 1 # int | A unique integer value identifying this job.
    patched_labeled_data_request = PatchedLabeledDataRequest(
        version=0,
        tags=[
            LabeledImageRequest(
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
            ),
        ],
        shapes=[
            LabeledShapeRequest(
                type=ShapeType("rectangle"),
                occluded=False,
                outside=False,
                z_order=0,
                rotation=0.0,
                points=[
                    3.14,
                ],
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
                elements=[
                    SubLabeledShapeRequest(
                        type=ShapeType("rectangle"),
                        occluded=False,
                        outside=False,
                        z_order=0,
                        rotation=0.0,
                        points=[
                            3.14,
                        ],
                        id=1,
                        frame=0,
                        label_id=0,
                        group=0,
                        source="manual",
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
            ),
        ],
        tracks=[
            LabeledTrackRequest(
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                shapes=[
                    TrackedShapeRequest(
                        type=ShapeType("rectangle"),
                        occluded=False,
                        outside=False,
                        z_order=0,
                        rotation=0.0,
                        points=[
                            3.14,
                        ],
                        id=1,
                        frame=0,
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
                elements=[
                    SubLabeledTrackRequest(
                        id=1,
                        frame=0,
                        label_id=0,
                        group=0,
                        source="manual",
                        shapes=[
                            TrackedShapeRequest(
                                type=ShapeType("rectangle"),
                                occluded=False,
                                outside=False,
                                z_order=0,
                                rotation=0.0,
                                points=[
                                    3.14,
                                ],
                                id=1,
                                frame=0,
                                attributes=[
                                    AttributeValRequest(
                                        spec_id=1,
                                        value="value_example",
                                    ),
                                ],
                            ),
                        ],
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
            ),
        ],
    ) # PatchedLabeledDataRequest |  (optional)

    try:
        api_client.jobs_api.partial_update_annotations(
            action,
            id,
            patched_labeled_data_request=patched_labeled_data_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.partial_update_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
action str
id int A unique integer value identifying this job.
patched_labeled_data_request PatchedLabeledDataRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Annotations successfully uploaded -

partial_update_data_meta

partial_update_data_meta( id, patched_job_data_meta_write_request=None, **kwargs )

Update metainformation for media files in a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    patched_job_data_meta_write_request = PatchedJobDataMetaWriteRequest(
        deleted_frames=[
            0,
        ],
    ) # PatchedJobDataMetaWriteRequest |  (optional)

    try:
        (data, response) = api_client.jobs_api.partial_update_data_meta(
            id,
            patched_job_data_meta_write_request=patched_job_data_meta_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.partial_update_data_meta(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
patched_job_data_meta_write_request PatchedJobDataMetaWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataMetaRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_validation_layout

partial_update_validation_layout( id, patched_job_validation_layout_write_request=None, **kwargs )

Allows updating current validation configuration

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    patched_job_validation_layout_write_request = PatchedJobValidationLayoutWriteRequest(
        frame_selection_method=None,
        honeypot_real_frames=[
            0,
        ],
    ) # PatchedJobValidationLayoutWriteRequest |  (optional)

    try:
        (data, response) = api_client.jobs_api.partial_update_validation_layout(
            id,
            patched_job_validation_layout_write_request=patched_job_validation_layout_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.partial_update_validation_layout(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
patched_job_validation_layout_write_request PatchedJobValidationLayoutWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[JobValidationLayoutRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get job details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        (data, response) = api_client.jobs_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[JobRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotations

retrieve_annotations( id, action=None, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, **kwargs )

Get job annotations or export job annotations as a dataset in a specific format

If format is specified, a ZIP archive will be returned. Otherwise, the annotations will be returned as a JSON document. Deprecation warning: Utilizing this endpoint to export annotations as a dataset in a specific format will be deprecated in one of the next releases. Consider using new API: - POST /api/jobs/<job_id>/dataset/export?save_images=False to initiate export process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where need to save downloaded annotation (optional)
    use_default_location = True # bool | Use the location that was configured in the task to export annotation (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.jobs_api.retrieve_annotations(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where need to save downloaded annotation [optional]
use_default_location bool Use the location that was configured in the task to export annotation [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationsRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output file is ready for downloading -
202 Exporting has been started -
405 Format is not available -

retrieve_data

retrieve_data( id, index=None, number=None, quality=None, type=None, **kwargs )

Get data of a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    index = 1 # int | A unique number value identifying chunk, starts from 0 for each job (optional)
    number = 1 # int | A unique number value identifying chunk or frame. The numbers are the same as for the task. Deprecated for chunks in favor of 'index' (optional)
    quality = "compressed" # str | Specifies the quality level of the requested data (optional)
    type = "chunk" # str | Specifies the type of the requested data (optional)

    try:
        (data, response) = api_client.jobs_api.retrieve_data(
            id,
            index=index,
            number=number,
            quality=quality,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
index int A unique number value identifying chunk, starts from 0 for each job [optional]
number int A unique number value identifying chunk or frame. The numbers are the same as for the task. Deprecated for chunks in favor of ‘index’ [optional]
quality str Specifies the quality level of the requested data [optional]
type str Specifies the type of the requested data [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[file_type, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Data of a specific type -

retrieve_data_meta

retrieve_data_meta( id, **kwargs )

Get metainformation for media files in a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        (data, response) = api_client.jobs_api.retrieve_data_meta(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_data_meta(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataMetaRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_dataset

retrieve_dataset( format, id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Export job as a dataset in a specific format

Deprecation warning: This endpoint will be deprecated in one of the next releases. Consider using new API: - POST /api/jobs/<job_id>/dataset/export?save_images=True to initiate export process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this job.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    use_default_location = True # bool | Use the location that was configured in the task to export dataset (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.jobs_api.retrieve_dataset(
            format,
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this job.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
use_default_location bool Use the location that was configured in the task to export dataset [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[file_type, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output file is ready for downloading -
202 Exporting has been started -
405 Format is not available -

retrieve_preview

retrieve_preview( id, **kwargs )

Get a preview image for a job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        api_client.jobs_api.retrieve_preview(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_preview(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Job image preview -

retrieve_validation_layout

retrieve_validation_layout( id, **kwargs )

Allows getting current validation configuration

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.

    try:
        (data, response) = api_client.jobs_api.retrieve_validation_layout(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_validation_layout(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[JobValidationLayoutRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

update_annotations

update_annotations( id, cloud_storage_id=None, filename=None, format=None, location=None, rq_id=None, use_default_location=None, job_annotations_update_request=None, **kwargs )

Replace job annotations / Get annotation import status

To check the status of an import request: After initiating the annotation import, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent PUT /api/jobs/id/annotations requests to track the status of the import.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Annotation file name (optional)
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | where to import the annotation from (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    use_default_location = True # bool | Use the location that was configured in the task to import annotation (optional) if omitted the server will use the default value of True
    job_annotations_update_request = JobAnnotationsUpdateRequest(None) # JobAnnotationsUpdateRequest |  (optional)

    try:
        api_client.jobs_api.update_annotations(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            rq_id=rq_id,
            use_default_location=use_default_location,
            job_annotations_update_request=job_annotations_update_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.update_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
cloud_storage_id int Storage id [optional]
filename str Annotation file name [optional]
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str where to import the annotation from [optional]
rq_id str rq id [optional]
use_default_location bool Use the location that was configured in the task to import annotation [optional] if omitted the server will use the default value of True
job_annotations_update_request JobAnnotationsUpdateRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 Import has finished -
202 Import is in progress -
405 Format is not available -

2.1.1.11 - LabelsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
destroy DELETE /api/labels/{id} Delete a label
list GET /api/labels List labels
partial_update PATCH /api/labels/{id} Update a label
retrieve GET /api/labels/{id} Get label details

destroy

destroy( id, **kwargs )

Delete a label

To delete a sublabel, please use the PATCH method of the parent label.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this label.

    try:
        api_client.labels_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling LabelsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this label.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The label has been deleted -

list

list( x_organization=None, color=None, filter=None, job_id=None, name=None, org=None, org_id=None, page=None, page_size=None, parent=None, parent_id=None, project_id=None, search=None, sort=None, task_id=None, type=None, **kwargs )

List labels

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    color = "color_example" # str | A simple equality filter for the color field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['name', 'parent', 'id', 'type', 'color', 'parent_id']. (optional)
    job_id = 1 # int | A simple equality filter for job id (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    parent = "parent_example" # str | A simple equality filter for the parent field (optional)
    parent_id = 1 # int | A simple equality filter for the parent_id field (optional)
    project_id = 1 # int | A simple equality filter for project id (optional)
    search = "search_example" # str | A search term. Available search_fields: ('name', 'parent') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['name', 'parent', 'id', 'type', 'color', 'parent_id'] (optional)
    task_id = 1 # int | A simple equality filter for task id (optional)
    type = "bbox" # str | A simple equality filter for the type field (optional)

    try:
        (data, response) = api_client.labels_api.list(
            x_organization=x_organization,
            color=color,
            filter=filter,
            job_id=job_id,
            name=name,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            parent=parent,
            parent_id=parent_id,
            project_id=project_id,
            search=search,
            sort=sort,
            task_id=task_id,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LabelsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
color str A simple equality filter for the color field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [’name’, ‘parent’, ‘id’, ’type’, ‘color’, ‘parent_id’]. [optional]
job_id int A simple equality filter for job id [optional]
name str A simple equality filter for the name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
parent str A simple equality filter for the parent field [optional]
parent_id int A simple equality filter for the parent_id field [optional]
project_id int A simple equality filter for project id [optional]
search str A search term. Available search_fields: (’name’, ‘parent’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [’name’, ‘parent’, ‘id’, ’type’, ‘color’, ‘parent_id’] [optional]
task_id int A simple equality filter for task id [optional]
type str A simple equality filter for the type field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedLabelList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_label_request=None, **kwargs )

Update a label

To modify a sublabel, please use the PATCH method of the parent label.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this label.
    patched_label_request = PatchedLabelRequest(
        id=1,
        name="name_example",
        color="color_example",
        attributes=[
            AttributeRequest(
                id=1,
                name="name_example",
                mutable=True,
                input_type=InputTypeEnum("checkbox"),
                default_value="default_value_example",
                values=[
                    "values_example",
                ],
            ),
        ],
        deleted=True,
        type="type_example",
        svg="svg_example",
        sublabels=[
            SublabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        id=1,
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                type="type_example",
                has_parent=True,
            ),
        ],
    ) # PatchedLabelRequest |  (optional)

    try:
        (data, response) = api_client.labels_api.partial_update(
            id,
            patched_label_request=patched_label_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LabelsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this label.
patched_label_request PatchedLabelRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Label, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get label details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this label.

    try:
        (data, response) = api_client.labels_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LabelsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this label.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Label, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.12 - LambdaApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_functions POST /api/lambda/functions/{func_id}
create_requests POST /api/lambda/requests Method calls the function
delete_requests DELETE /api/lambda/requests/{id} Method cancels the request
list_functions GET /api/lambda/functions Method returns a list of functions
list_requests GET /api/lambda/requests Method returns a list of requests
retrieve_functions GET /api/lambda/functions/{func_id} Method returns the information about the function
retrieve_requests GET /api/lambda/requests/{id} Method returns the status of the request

create_functions

create_functions( func_id, online_function_call_request=None, **kwargs )

Allows to execute a function for immediate computation. Intended for short-lived executions, useful for interactive calls. When executed for interactive annotation, the job id must be specified in the ‘job’ input field. The task id is not required in this case, but if it is specified, it must match the job task id.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    func_id = "2" # str | 
    online_function_call_request = OnlineFunctionCallRequest(
        job=1,
        task=1,
    ) # OnlineFunctionCallRequest |  (optional)

    try:
        api_client.lambda_api.create_functions(
            func_id,
            online_function_call_request=online_function_call_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.create_functions(): %s\n" % e)

Parameters

Name Type Description Notes
func_id str
online_function_call_request OnlineFunctionCallRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Returns function invocation results -

create_requests

create_requests( function_call_request, x_organization=None, org=None, org_id=None, **kwargs )

Method calls the function

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    function_call_request = FunctionCallRequest(
        function="function_example",
        task=1,
        job=1,
        max_distance=1,
        threshold=3.14,
        cleanup=False,
        conv_mask_to_poly=True,
        conv_mask_to_poly=True,
        mapping={
            "key": LabelMappingEntryRequest(
                name="name_example",
                attributes={
                    "key": "key_example",
                },
                sublabels={
                    "key": SublabelMappingEntryRequest(
                        name="name_example",
                        attributes={
                            "key": "key_example",
                        },
                    ),
                },
            ),
        },
    ) # FunctionCallRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.lambda_api.create_requests(
            function_call_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.create_requests(): %s\n" % e)

Parameters

Name Type Description Notes
function_call_request FunctionCallRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[FunctionCall, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

delete_requests

delete_requests( id, **kwargs )

Method cancels the request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = "id_example" # str | Request id

    try:
        api_client.lambda_api.delete_requests(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.delete_requests(): %s\n" % e)

Parameters

Name Type Description Notes
id str Request id

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -

list_functions

list_functions( **kwargs )

Method returns a list of functions

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        api_client.lambda_api.list_functions()
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.list_functions(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 No response body -

list_requests

list_requests( **kwargs )

Method returns a list of requests

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.lambda_api.list_requests()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.list_requests(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[list[FunctionCall], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_functions

retrieve_functions( func_id, **kwargs )

Method returns the information about the function

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    func_id = "2" # str | 

    try:
        (data, response) = api_client.lambda_api.retrieve_functions(
            func_id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.retrieve_functions(): %s\n" % e)

Parameters

Name Type Description Notes
func_id str

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Information about the function -

retrieve_requests

retrieve_requests( id, **kwargs )

Method returns the status of the request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = "id_example" # str | Request id

    try:
        (data, response) = api_client.lambda_api.retrieve_requests(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling LambdaApi.retrieve_requests(): %s\n" % e)

Parameters

Name Type Description Notes
id str Request id

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[FunctionCall, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.13 - MembershipsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
destroy DELETE /api/memberships/{id} Delete a membership
list GET /api/memberships List memberships
partial_update PATCH /api/memberships/{id} Update a membership
retrieve GET /api/memberships/{id} Get membership details

destroy

destroy( id, **kwargs )

Delete a membership

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this membership.

    try:
        api_client.memberships_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling MembershipsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this membership.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The membership has been deleted -

list

list( x_organization=None, filter=None, org=None, org_id=None, page=None, page_size=None, role=None, search=None, sort=None, user=None, **kwargs )

List memberships

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['user', 'role', 'id']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    role = "worker" # str | A simple equality filter for the role field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('user', 'role') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['user', 'role', 'id'] (optional)
    user = "user_example" # str | A simple equality filter for the user field (optional)

    try:
        (data, response) = api_client.memberships_api.list(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            role=role,
            search=search,
            sort=sort,
            user=user,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling MembershipsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘user’, ‘role’, ‘id’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
role str A simple equality filter for the role field [optional]
search str A search term. Available search_fields: (‘user’, ‘role’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘user’, ‘role’, ‘id’] [optional]
user str A simple equality filter for the user field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedMembershipReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_membership_write_request=None, **kwargs )

Update a membership

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this membership.
    patched_membership_write_request = PatchedMembershipWriteRequest(
        role=RoleEnum("worker"),
    ) # PatchedMembershipWriteRequest |  (optional)

    try:
        (data, response) = api_client.memberships_api.partial_update(
            id,
            patched_membership_write_request=patched_membership_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling MembershipsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this membership.
patched_membership_write_request PatchedMembershipWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[MembershipRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get membership details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this membership.

    try:
        (data, response) = api_client.memberships_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling MembershipsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this membership.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[MembershipRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.14 - OrganizationsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/organizations Create an organization
destroy DELETE /api/organizations/{id} Delete an organization
list GET /api/organizations List organizations
partial_update PATCH /api/organizations/{id} Update an organization
retrieve GET /api/organizations/{id} Get organization details

create

create( organization_write_request, **kwargs )

Create an organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    organization_write_request = OrganizationWriteRequest(
        slug="z",
        name="name_example",
        description="description_example",
        contact={},
    ) # OrganizationWriteRequest | 

    try:
        (data, response) = api_client.organizations_api.create(
            organization_write_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
organization_write_request OrganizationWriteRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[OrganizationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Delete an organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.

    try:
        api_client.organizations_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The organization has been deleted -

list

list( filter=None, name=None, owner=None, page=None, page_size=None, search=None, slug=None, sort=None, **kwargs )

List organizations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['name', 'owner', 'slug', 'id']. (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('name', 'owner', 'slug') (optional)
    slug = "slug_example" # str | A simple equality filter for the slug field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['name', 'owner', 'slug', 'id'] (optional)

    try:
        (data, response) = api_client.organizations_api.list(
            filter=filter,
            name=name,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            slug=slug,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [’name’, ‘owner’, ‘slug’, ‘id’]. [optional]
name str A simple equality filter for the name field [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (’name’, ‘owner’, ‘slug’) [optional]
slug str A simple equality filter for the slug field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [’name’, ‘owner’, ‘slug’, ‘id’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedOrganizationReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_organization_write_request=None, **kwargs )

Update an organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.
    patched_organization_write_request = PatchedOrganizationWriteRequest(
        slug="z",
        name="name_example",
        description="description_example",
        contact={},
    ) # PatchedOrganizationWriteRequest |  (optional)

    try:
        (data, response) = api_client.organizations_api.partial_update(
            id,
            patched_organization_write_request=patched_organization_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.
patched_organization_write_request PatchedOrganizationWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[OrganizationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get organization details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.

    try:
        (data, response) = api_client.organizations_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[OrganizationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.15 - ProjectsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/projects Create a project
create_backup POST /api/projects/backup/ Recreate a project from a backup
create_backup_export POST /api/projects/{id}/backup/export Initiate process to backup resource
create_dataset POST /api/projects/{id}/dataset/ Import a dataset into a project
create_dataset_export POST /api/projects/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
destroy DELETE /api/projects/{id} Delete a project
list GET /api/projects List projects
partial_update PATCH /api/projects/{id} Update a project
retrieve GET /api/projects/{id} Get project details
retrieve_annotations GET /api/projects/{id}/annotations Export project annotations as a dataset
retrieve_backup GET /api/projects/{id}/backup Back up a project
retrieve_dataset GET /api/projects/{id}/dataset/ Export a project as a dataset / Check dataset import status
retrieve_preview GET /api/projects/{id}/preview Get a preview image for a project

create

create( project_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    project_write_request = ProjectWriteRequest(
        name="name_example",
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        id=1,
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                id=1,
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        target_storage=PatchedProjectWriteRequestTargetStorage(None),
        source_storage=PatchedProjectWriteRequestTargetStorage(None),
    ) # ProjectWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.projects_api.create(
            project_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
project_write_request ProjectWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_backup

create_backup( x_organization=None, cloud_storage_id=None, filename=None, location=None, org=None, org_id=None, rq_id=None, backup_write_request=None, **kwargs )

Recreate a project from a backup

The backup import process is as follows: The first request POST /api/projects/backup will initiate file upload and will create the rq job on the server in which the process of a project creating from an uploaded backup will be carried out. After initiating the backup upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent requests to track the status of the project creation. Once the project has been successfully created, the server will return the id of the newly created project.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "local" # str | Where to import the backup file from (optional) if omitted the server will use the default value of "local"
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    backup_write_request = BackupWriteRequest(None) # BackupWriteRequest |  (optional)

    try:
        api_client.projects_api.create_backup(
            x_organization=x_organization,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            org=org,
            org_id=org_id,
            rq_id=rq_id,
            backup_write_request=backup_write_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_backup(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where to import the backup file from [optional] if omitted the server will use the default value of “local”
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
rq_id str rq id [optional]
backup_write_request BackupWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 The project has been imported -
202 Importing a backup file has been started -

create_backup_export

create_backup_export( id, cloud_storage_id=None, filename=None, location=None, **kwargs )

Initiate process to backup resource

The request POST /api/<projects|tasks>/id/backup/export will initialize a background process to backup a resource. To check status of the process please, use GET /api/requests/<rq_id> where rq_id is request ID returned in the response for this endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded backup (optional)

    try:
        (data, response) = api_client.projects_api.create_backup_export(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_backup_export(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where need to save downloaded backup [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Creating a backup file has been started -
400 Wrong query parameters were passed -
409 The backup process has already been initiated and is not yet finished -

create_dataset

create_dataset( id, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, dataset_write_request=None, **kwargs )

Import a dataset into a project

The request POST /api/projects/id/dataset will initiate file upload and will create the rq job on the server in which the process of dataset import from a file will be carried out. Please, use the GET /api/projects/id/dataset endpoint for checking status of the process.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Dataset file name (optional)
    format = "format_example" # str | Desired dataset format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where to import the dataset from (optional)
    use_default_location = True # bool | Use the location that was configured in the project to import annotations (optional) if omitted the server will use the default value of True
    dataset_write_request = DatasetWriteRequest(None) # DatasetWriteRequest |  (optional)

    try:
        (data, response) = api_client.projects_api.create_dataset(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
            dataset_write_request=dataset_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
cloud_storage_id int Storage id [optional]
filename str Dataset file name [optional]
format str Desired dataset format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where to import the dataset from [optional]
use_default_location bool Use the location that was configured in the project to import annotations [optional] if omitted the server will use the default value of True
dataset_write_request DatasetWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Importing has been started -
400 Failed to import dataset -
405 Format is not available -

create_dataset_export

create_dataset_export( format, id, cloud_storage_id=None, filename=None, location=None, save_images=None, **kwargs )

Initialize process to export resource as a dataset in a specific format

The request POST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, use GET /api/requests/<rq_id> where rq_id is request ID returned in the response for this endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this project.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    save_images = False # bool | Include images or not (optional) if omitted the server will use the default value of False

    try:
        (data, response) = api_client.projects_api.create_dataset_export(
            format,
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            save_images=save_images,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_dataset_export(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this project.
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
save_images bool Include images or not [optional] if omitted the server will use the default value of False

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Exporting has been started -
405 Format is not available -
409 Exporting is already in progress -

destroy

destroy( id, **kwargs )

Delete a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        api_client.projects_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The project has been deleted -

list

list( x_organization=None, assignee=None, filter=None, name=None, org=None, org_id=None, owner=None, page=None, page_size=None, search=None, sort=None, status=None, **kwargs )

List projects

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    assignee = "assignee_example" # str | A simple equality filter for the assignee field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['name', 'owner', 'assignee', 'status', 'id', 'updated_date']. (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('name', 'owner', 'assignee', 'status') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['name', 'owner', 'assignee', 'status', 'id', 'updated_date'] (optional)
    status = "annotation" # str | A simple equality filter for the status field (optional)

    try:
        (data, response) = api_client.projects_api.list(
            x_organization=x_organization,
            assignee=assignee,
            filter=filter,
            name=name,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
            status=status,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
assignee str A simple equality filter for the assignee field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [’name’, ‘owner’, ‘assignee’, ‘status’, ‘id’, ‘updated_date’]. [optional]
name str A simple equality filter for the name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (’name’, ‘owner’, ‘assignee’, ‘status’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [’name’, ‘owner’, ‘assignee’, ‘status’, ‘id’, ‘updated_date’] [optional]
status str A simple equality filter for the status field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedProjectReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_project_write_request=None, **kwargs )

Update a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    patched_project_write_request = PatchedProjectWriteRequest(
        name="name_example",
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        id=1,
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                id=1,
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        target_storage=PatchedProjectWriteRequestTargetStorage(None),
        source_storage=PatchedProjectWriteRequestTargetStorage(None),
    ) # PatchedProjectWriteRequest |  (optional)

    try:
        (data, response) = api_client.projects_api.partial_update(
            id,
            patched_project_write_request=patched_project_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
patched_project_write_request PatchedProjectWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get project details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        (data, response) = api_client.projects_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotations

retrieve_annotations( format, id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Export project annotations as a dataset

Deprecation warning: Using this endpoint to initiate export of annotations as a dataset or to check export status is deprecated. Consider using new API: - POST /api/projects/<project_id>/dataset/export?save_images=False to initiate exporting process - GET /api/requests/<rq_id> to check export status, where rq_id is request id returned on initializing request’

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    use_default_location = True # bool | Use the location that was configured in project to export annotation (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.projects_api.retrieve_annotations(
            format,
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this project.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
use_default_location bool Use the location that was configured in project to export annotation [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationsRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Annotations file is ready to download -
202 Dump of annotations has been started -
401 Format is not specified -
405 Format is not available -

retrieve_backup

retrieve_backup( id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Back up a project

Deprecation warning: This endpoint will be deprecated in one of the next releases. Consider using new API: - POST /api/projects/<project_id>/backup/export to initiate backup process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process after backup file had been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded backup (optional)
    use_default_location = True # bool | Use the location that was configured in project to export backup (optional) if omitted the server will use the default value of True

    try:
        api_client.projects_api.retrieve_backup(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_backup(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
action str Used to start downloading process after backup file had been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where need to save downloaded backup [optional]
use_default_location bool Use the location that was configured in project to export backup [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output backup file is ready for downloading -
202 Creating a backup file has been started -

retrieve_dataset

retrieve_dataset( id, action=None, cloud_storage_id=None, filename=None, format=None, location=None, rq_id=None, use_default_location=None, **kwargs )

Export a project as a dataset / Check dataset import status

To check the status of the process of importing a project dataset from a file: After initiating the dataset upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent GET /api/projects/id/dataset requests to track the status of the dataset import. Also you should specify action parameter: action=import_status. Deprecation warning: Utilizing this endpoint to export project dataset in a specific format will be deprecated in one of the next releases. Consider using new API: - POST /api/projects/<project_id>/dataset/export/?save_images=True to initiate export process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    use_default_location = True # bool | Use the location that was configured in project to import dataset (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.projects_api.retrieve_dataset(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            rq_id=rq_id,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
action str Used to start downloading process locally after annotation file has been created [optional]
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where need to save downloaded dataset [optional]
rq_id str rq id [optional]
use_default_location bool Use the location that was configured in project to import dataset [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[file_type, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output file is ready for downloading -
202 Exporting has been started -
405 Format is not available -

retrieve_preview

retrieve_preview( id, **kwargs )

Get a preview image for a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        api_client.projects_api.retrieve_preview(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_preview(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Project image preview -
404 Project image preview not found -

2.1.1.16 - QualityApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_report POST /api/quality/reports Create a quality report
list_conflicts GET /api/quality/conflicts List annotation conflicts in a quality report
list_reports GET /api/quality/reports List quality reports
list_settings GET /api/quality/settings List quality settings instances
partial_update_settings PATCH /api/quality/settings/{id} Update a quality settings instance
retrieve_report GET /api/quality/reports/{id} Get quality report details
retrieve_report_data GET /api/quality/reports/{id}/data Get quality report contents
retrieve_settings GET /api/quality/settings/{id} Get quality settings instance details

create_report

create_report( rq_id=None, quality_report_create_request=None, **kwargs )

Create a quality report

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    rq_id = "rq_id_example" # str | The report creation request id. Can be specified to check the report creation status.  (optional)
    quality_report_create_request = QualityReportCreateRequest(
        task_id=1,
    ) # QualityReportCreateRequest |  (optional)

    try:
        (data, response) = api_client.quality_api.create_report(
            rq_id=rq_id,
            quality_report_create_request=quality_report_create_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.create_report(): %s\n" % e)

Parameters

Name Type Description Notes
rq_id str The report creation request id. Can be specified to check the report creation status. [optional]
quality_report_create_request QualityReportCreateRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualityReport, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -
202 A quality report request has been enqueued, the request id is returned. The request status can be checked at this endpoint by passing the rq_id as the query parameter. If the request id is specified, this response means the quality report request is queued or is being processed. -
400 Invalid or failed request, check the response data for details -

list_conflicts

list_conflicts( x_organization=None, filter=None, frame=None, job_id=None, org=None, org_id=None, page=None, page_size=None, report_id=None, severity=None, sort=None, task_id=None, type=None, **kwargs )

List annotation conflicts in a quality report

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'frame', 'type', 'job_id', 'task_id', 'severity']. (optional)
    frame = 1 # int | A simple equality filter for the frame field (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    report_id = 1 # int | A simple equality filter for report id (optional)
    severity = "warning" # str | A simple equality filter for the severity field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id', 'frame', 'type', 'job_id', 'task_id', 'severity'] (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)
    type = "missing_annotation" # str | A simple equality filter for the type field (optional)

    try:
        (data, response) = api_client.quality_api.list_conflicts(
            x_organization=x_organization,
            filter=filter,
            frame=frame,
            job_id=job_id,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            report_id=report_id,
            severity=severity,
            sort=sort,
            task_id=task_id,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_conflicts(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ‘frame’, ’type’, ‘job_id’, ’task_id’, ‘severity’]. [optional]
frame int A simple equality filter for the frame field [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
report_id int A simple equality filter for report id [optional]
severity str A simple equality filter for the severity field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’, ‘frame’, ’type’, ‘job_id’, ’task_id’, ‘severity’] [optional]
task_id int A simple equality filter for the task_id field [optional]
type str A simple equality filter for the type field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedAnnotationConflictList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

list_reports

list_reports( x_organization=None, filter=None, job_id=None, org=None, org_id=None, page=None, page_size=None, parent_id=None, sort=None, target=None, task_id=None, **kwargs )

List quality reports

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'job_id', 'created_date', 'gt_last_updated', 'target_last_updated', 'parent_id']. (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    parent_id = 1 # int | A simple equality filter for the parent_id field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id', 'job_id', 'created_date', 'gt_last_updated', 'target_last_updated', 'parent_id'] (optional)
    target = "target_example" # str | A simple equality filter for target (optional)
    task_id = 1 # int | A simple equality filter for task id (optional)

    try:
        (data, response) = api_client.quality_api.list_reports(
            x_organization=x_organization,
            filter=filter,
            job_id=job_id,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            parent_id=parent_id,
            sort=sort,
            target=target,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_reports(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ‘job_id’, ‘created_date’, ‘gt_last_updated’, ’target_last_updated’, ‘parent_id’]. [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
parent_id int A simple equality filter for the parent_id field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’, ‘job_id’, ‘created_date’, ‘gt_last_updated’, ’target_last_updated’, ‘parent_id’] [optional]
target str A simple equality filter for target [optional]
task_id int A simple equality filter for task id [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedQualityReportList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

list_settings

list_settings( x_organization=None, filter=None, org=None, org_id=None, page=None, page_size=None, sort=None, task_id=None, **kwargs )

List quality settings instances

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'task_id']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id'] (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)

    try:
        (data, response) = api_client.quality_api.list_settings(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            sort=sort,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_settings(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ’task_id’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’] [optional]
task_id int A simple equality filter for the task_id field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedQualitySettingsList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_settings

partial_update_settings( id, patched_quality_settings_request=None, **kwargs )

Update a quality settings instance

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | An id of a quality settings instance
    patched_quality_settings_request = PatchedQualitySettingsRequest(
        target_metric=None,
        target_metric_threshold=3.14,
        max_validations_per_job=0,
        iou_threshold=3.14,
        oks_sigma=3.14,
        point_size_base=None,
        line_thickness=3.14,
        low_overlap_threshold=3.14,
        compare_line_orientation=True,
        line_orientation_threshold=3.14,
        compare_groups=True,
        group_match_threshold=3.14,
        check_covered_annotations=True,
        object_visibility_threshold=3.14,
        panoptic_comparison=True,
        compare_attributes=True,
        match_empty_frames=False,
    ) # PatchedQualitySettingsRequest |  (optional)

    try:
        (data, response) = api_client.quality_api.partial_update_settings(
            id,
            patched_quality_settings_request=patched_quality_settings_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.partial_update_settings(): %s\n" % e)

Parameters

Name Type Description Notes
id int An id of a quality settings instance
patched_quality_settings_request PatchedQualitySettingsRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualitySettings, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_report

retrieve_report( id, **kwargs )

Get quality report details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this quality report.

    try:
        (data, response) = api_client.quality_api.retrieve_report(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_report(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this quality report.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualityReport, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_report_data

retrieve_report_data( id, **kwargs )

Get quality report contents

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this quality report.

    try:
        (data, response) = api_client.quality_api.retrieve_report_data(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_report_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this quality report.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_settings

retrieve_settings( id, **kwargs )

Get quality settings instance details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | An id of a quality settings instance

    try:
        (data, response) = api_client.quality_api.retrieve_settings(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_settings(): %s\n" % e)

Parameters

Name Type Description Notes
id int An id of a quality settings instance

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualitySettings, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.17 - RequestsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_cancel POST /api/requests/{id}/cancel Cancel request
list GET /api/requests List requests
retrieve GET /api/requests/{id} Get request details

create_cancel

create_cancel( id, **kwargs )

Cancel request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = "id_example" # str | 

    try:
        api_client.requests_api.create_cancel(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling RequestsApi.create_cancel(): %s\n" % e)

Parameters

Name Type Description Notes
id str

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 The request has been cancelled -

list

list( action=None, filter=None, format=None, job_id=None, org=None, page=None, page_size=None, project_id=None, sort=None, status=None, subresource=None, target=None, task_id=None, **kwargs )

List requests

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    action = "autoannotate" # str | A simple equality filter for the action field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['status', 'project_id', 'task_id', 'job_id', 'action', 'target', 'subresource', 'format']. (optional)
    format = "format_example" # str | A simple equality filter for the format field (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | A simple equality filter for the org field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    project_id = 1 # int | A simple equality filter for the project_id field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['created_date', 'status', 'action'] (optional)
    status = "queued" # str | A simple equality filter for the status field (optional)
    subresource = "annotations" # str | A simple equality filter for the subresource field (optional)
    target = "project" # str | A simple equality filter for the target field (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)

    try:
        (data, response) = api_client.requests_api.list(
            action=action,
            filter=filter,
            format=format,
            job_id=job_id,
            org=org,
            page=page,
            page_size=page_size,
            project_id=project_id,
            sort=sort,
            status=status,
            subresource=subresource,
            target=target,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling RequestsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
action str A simple equality filter for the action field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘status’, ‘project_id’, ’task_id’, ‘job_id’, ‘action’, ’target’, ‘subresource’, ‘format’]. [optional]
format str A simple equality filter for the format field [optional]
job_id int A simple equality filter for the job_id field [optional]
org str A simple equality filter for the org field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
project_id int A simple equality filter for the project_id field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘created_date’, ‘status’, ‘action’] [optional]
status str A simple equality filter for the status field [optional]
subresource str A simple equality filter for the subresource field [optional]
target str A simple equality filter for the target field [optional]
task_id int A simple equality filter for the task_id field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedRequestList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get request details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = "id_example" # str | 

    try:
        (data, response) = api_client.requests_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling RequestsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id str

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Request, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.18 - SchemaApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
retrieve GET /api/schema/

retrieve

retrieve( lang=None, scheme=None, **kwargs )

OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    lang = "af" # str |  (optional)
    scheme = "json" # str |  (optional)

    try:
        (data, response) = api_client.schema_api.retrieve(
            lang=lang,
            scheme=scheme,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling SchemaApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
lang str [optional]
scheme str [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.oai.openapi, application/yaml, application/vnd.oai.openapi+json, application/json

HTTP response details

Status code Description Response headers
200 -

2.1.1.19 - ServerApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
list_share GET /api/server/share List files/directories in the mounted share
retrieve_about GET /api/server/about Get basic CVAT information
retrieve_annotation_formats GET /api/server/annotation/formats Get supported annotation formats
retrieve_plugins GET /api/server/plugins Get enabled plugins

list_share

list_share( directory=None, search=None, **kwargs )

List files/directories in the mounted share

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    directory = "directory_example" # str | Directory to browse (optional)
    search = "search_example" # str | Search for specific files (optional)

    try:
        (data, response) = api_client.server_api.list_share(
            directory=directory,
            search=search,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.list_share(): %s\n" % e)

Parameters

Name Type Description Notes
directory str Directory to browse [optional]
search str Search for specific files [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[list[FileInfo], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_about

retrieve_about( **kwargs )

Get basic CVAT information

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_about()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_about(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[About, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotation_formats

retrieve_annotation_formats( **kwargs )

Get supported annotation formats

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_annotation_formats()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_annotation_formats(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DatasetFormats, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_plugins

retrieve_plugins( **kwargs )

Get enabled plugins

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_plugins()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_plugins(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Plugins, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.20 - TasksApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/tasks Create a task
create_annotations POST /api/tasks/{id}/annotations/ Import annotations into a task
create_backup POST /api/tasks/backup/ Recreate a task from a backup
create_backup_export POST /api/tasks/{id}/backup/export Initiate process to backup resource
create_data POST /api/tasks/{id}/data/ Attach data to a task
create_dataset_export POST /api/tasks/{id}/dataset/export Initialize process to export resource as a dataset in a specific format
destroy DELETE /api/tasks/{id} Delete a task
destroy_annotations DELETE /api/tasks/{id}/annotations/ Delete task annotations
list GET /api/tasks List tasks
partial_update PATCH /api/tasks/{id} Update a task
partial_update_annotations PATCH /api/tasks/{id}/annotations/ Update task annotations
partial_update_data_meta PATCH /api/tasks/{id}/data/meta Update metainformation for media files in a task
partial_update_validation_layout PATCH /api/tasks/{id}/validation_layout Allows updating current validation configuration
retrieve GET /api/tasks/{id} Get task details
retrieve_annotations GET /api/tasks/{id}/annotations/ Get task annotations or export them as a dataset in a specific format
retrieve_backup GET /api/tasks/{id}/backup Back up a task
retrieve_data GET /api/tasks/{id}/data/ Get data of a task
retrieve_data_meta GET /api/tasks/{id}/data/meta Get metainformation for media files in a task
retrieve_dataset GET /api/tasks/{id}/dataset Export task as a dataset in a specific format
retrieve_preview GET /api/tasks/{id}/preview Get a preview image for a task
retrieve_status GET /api/tasks/{id}/status Get the creation status of a task
retrieve_validation_layout GET /api/tasks/{id}/validation_layout Allows getting current validation configuration
update_annotations PUT /api/tasks/{id}/annotations/ Replace task annotations / Get annotation import status

create

create( task_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create a task

The new task will not have any attached images or videos. To attach them, use the /api/tasks//data endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    task_write_request = TaskWriteRequest(
        name="name_example",
        project_id=1,
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        overlap=0,
        segment_size=0,
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        id=1,
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                id=1,
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        subset="subset_example",
        target_storage=PatchedTaskWriteRequestTargetStorage(None),
        source_storage=PatchedTaskWriteRequestTargetStorage(None),
    ) # TaskWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.tasks_api.create(
            task_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
task_write_request TaskWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_annotations

create_annotations( id, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, task_annotations_write_request=None, **kwargs )

Import annotations into a task

The request POST /api/tasks/id/annotations will initiate the import and will create the rq job on the server in which the import will be carried out. Please, use the PUT /api/tasks/id/annotations endpoint for checking status of the process.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Annotation file name (optional)
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | where to import the annotation from (optional)
    use_default_location = True # bool | Use the location that was configured in task to import annotations (optional) if omitted the server will use the default value of True
    task_annotations_write_request = TaskAnnotationsWriteRequest(None) # TaskAnnotationsWriteRequest |  (optional)

    try:
        api_client.tasks_api.create_annotations(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
            task_annotations_write_request=task_annotations_write_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
cloud_storage_id int Storage id [optional]
filename str Annotation file name [optional]
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str where to import the annotation from [optional]
use_default_location bool Use the location that was configured in task to import annotations [optional] if omitted the server will use the default value of True
task_annotations_write_request TaskAnnotationsWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 Uploading has finished -
202 Uploading has been started -
405 Format is not available -

create_backup

create_backup( x_organization=None, cloud_storage_id=None, filename=None, location=None, org=None, org_id=None, rq_id=None, task_file_request=None, **kwargs )

Recreate a task from a backup

The backup import process is as follows: The first request POST /api/tasks/backup will initiate file upload and will create the rq job on the server in which the process of a task creating from an uploaded backup will be carried out. After initiating the backup upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent requests to track the status of the task creation. Once the task has been successfully created, the server will return the id of the newly created task.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "local" # str | Where to import the backup file from (optional) if omitted the server will use the default value of "local"
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    task_file_request = TaskFileRequest(
        task_file=open('/path/to/file', 'rb'),
    ) # TaskFileRequest |  (optional)

    try:
        api_client.tasks_api.create_backup(
            x_organization=x_organization,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            org=org,
            org_id=org_id,
            rq_id=rq_id,
            task_file_request=task_file_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_backup(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where to import the backup file from [optional] if omitted the server will use the default value of “local”
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
rq_id str rq id [optional]
task_file_request TaskFileRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 The task has been imported -
202 Importing a backup file has been started -

create_backup_export

create_backup_export( id, cloud_storage_id=None, filename=None, location=None, **kwargs )

Initiate process to backup resource

The request POST /api/<projects|tasks>/id/backup/export will initialize a background process to backup a resource. To check status of the process please, use GET /api/requests/<rq_id> where rq_id is request ID returned in the response for this endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded backup (optional)

    try:
        (data, response) = api_client.tasks_api.create_backup_export(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_backup_export(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where need to save downloaded backup [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Creating a backup file has been started -
400 Wrong query parameters were passed -
409 The backup process has already been initiated and is not yet finished -

create_data

create_data( id, upload_finish=None, upload_multiple=None, upload_start=None, data_request=None, **kwargs )

Attach data to a task

Allows to upload data (images, video, etc.) to a task. Supports the TUS open file uploading protocol (https://tus.io/). Supports the following protocols: 1. A single Data request and 2.1. An Upload-Start request 2.2.a. Regular TUS protocol requests (Upload-Length + Chunks) 2.2.b. Upload-Multiple requests 2.3. An Upload-Finish request Requests: - Data - POST, no extra headers or ‘Upload-Start’ + ‘Upload-Finish’ headers. Contains data in the body. - Upload-Start - POST, has an ‘Upload-Start’ header. No body is expected. - Upload-Length - POST, has an ‘Upload-Length’ header (see the TUS specification) - Chunk - HEAD/PATCH (see the TUS specification). Sent to /data/ endpoints. - Upload-Finish - POST, has an ‘Upload-Finish’ header. Can contain data in the body. - Upload-Multiple - POST, has an ‘Upload-Multiple’ header. Contains data in the body. The ‘Upload-Finish’ request allows to specify the uploaded files should be ordered. This may be needed if the files can be sent unordered. To state that the input files are sent ordered, pass an empty list of files in the ‘upload_file_order’ field. If the files are sent unordered, the ordered file list is expected in the ‘upload_file_order’ field. It must be a list of string file paths, relative to the dataset root. Example: files = [ "cats/cat_1.jpg", "dogs/dog2.jpg", "image_3.png", … ] Independently of the file declaration field used (‘client_files’, ‘server_files’, etc.), when the ‘predefined’ sorting method is selected, the uploaded files will be ordered according to the ‘.jsonl’ manifest file, if it is found in the list of files. For archives (e.g. ‘.zip’), a manifest file (’*.jsonl’) is required when using the ‘predefined’ file ordering. Such file must be provided next to the archive in the list of files. Read more about manifest files here: https://docs.cvat.ai/docs/manual/advanced/dataset_manifest/ After all data is sent, the operation status can be retrieved via the GET /api/requests/<rq_id>, where rq_id is request ID returned for this request. Once data is attached to a task, it cannot be detached or replaced.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    upload_finish = True # bool | Finishes data upload. Can be combined with Upload-Start header to create task data with one request (optional)
    upload_multiple = True # bool | Indicates that data with this request are single or multiple files that should be attached to a task (optional)
    upload_start = True # bool | Initializes data upload. Optionally, can include upload metadata in the request body. (optional)
    data_request = DataRequest(
        chunk_size=0,
        image_quality=0,
        start_frame=0,
        stop_frame=0,
        frame_filter="frame_filter_example",
        client_files=[],
        server_files=[],
        remote_files=[],
        use_zip_chunks=False,
        server_files_exclude=[],
        cloud_storage_id=1,
        use_cache=False,
        copy_data=False,
        storage_method=StorageMethod("cache"),
        storage=StorageType("cloud_storage"),
        sorting_method=SortingMethod("lexicographical"),
        filename_pattern="filename_pattern_example",
        job_file_mapping=[
            [
                "a",
            ],
        ],
        upload_file_order=[
            "upload_file_order_example",
        ],
        validation_params=DataRequestValidationParams(None),
    ) # DataRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.create_data(
            id,
            upload_finish=upload_finish,
            upload_multiple=upload_multiple,
            upload_start=upload_start,
            data_request=data_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
upload_finish bool Finishes data upload. Can be combined with Upload-Start header to create task data with one request [optional]
upload_multiple bool Indicates that data with this request are single or multiple files that should be attached to a task [optional]
upload_start bool Initializes data upload. Optionally, can include upload metadata in the request body. [optional]
data_request DataRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataResponse, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Request to attach a data to a task has been accepted -

create_dataset_export

create_dataset_export( format, id, cloud_storage_id=None, filename=None, location=None, save_images=None, **kwargs )

Initialize process to export resource as a dataset in a specific format

The request POST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, use GET /api/requests/<rq_id> where rq_id is request ID returned in the response for this endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this task.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    save_images = False # bool | Include images or not (optional) if omitted the server will use the default value of False

    try:
        (data, response) = api_client.tasks_api.create_dataset_export(
            format,
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            save_images=save_images,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_dataset_export(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this task.
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
save_images bool Include images or not [optional] if omitted the server will use the default value of False

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Exporting has been started -
405 Format is not available -
409 Exporting is already in progress -

destroy

destroy( id, **kwargs )

Delete a task

All attached jobs, annotations and data will be deleted as well.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        api_client.tasks_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The task has been deleted -

destroy_annotations

destroy_annotations( id, **kwargs )

Delete task annotations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        api_client.tasks_api.destroy_annotations(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.destroy_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The annotation has been deleted -

list

list( x_organization=None, assignee=None, dimension=None, filter=None, mode=None, name=None, org=None, org_id=None, owner=None, page=None, page_size=None, project_id=None, project_name=None, search=None, sort=None, status=None, subset=None, tracker_link=None, validation_mode=None, **kwargs )

List tasks

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    assignee = "assignee_example" # str | A simple equality filter for the assignee field (optional)
    dimension = "3d" # str | A simple equality filter for the dimension field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['project_name', 'name', 'owner', 'status', 'assignee', 'subset', 'mode', 'dimension', 'tracker_link', 'validation_mode', 'id', 'project_id', 'updated_date'].  There are few examples for complex filtering tasks:      - Get all tasks from 1,2,3 projects - { \"and\" : [{ \"in\" : [{ \"var\" : \"project_id\" }, [1, 2, 3]]}]}      - Get all completed tasks from 1 project - { \"and\": [{ \"==\": [{ \"var\" : \"status\" }, \"completed\"]}, { \"==\" : [{ \"var\" : \"project_id\"}, 1]}]}   (optional)
    mode = "mode_example" # str | A simple equality filter for the mode field (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    project_id = 1 # int | A simple equality filter for the project_id field (optional)
    project_name = "project_name_example" # str | A simple equality filter for the project_name field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('project_name', 'name', 'owner', 'status', 'assignee', 'subset', 'mode', 'dimension', 'tracker_link', 'validation_mode') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['project_name', 'name', 'owner', 'status', 'assignee', 'subset', 'mode', 'dimension', 'tracker_link', 'validation_mode', 'id', 'project_id', 'updated_date'] (optional)
    status = "annotation" # str | A simple equality filter for the status field (optional)
    subset = "subset_example" # str | A simple equality filter for the subset field (optional)
    tracker_link = "tracker_link_example" # str | A simple equality filter for the tracker_link field (optional)
    validation_mode = "gt" # str | A simple equality filter for the validation_mode field (optional)

    try:
        (data, response) = api_client.tasks_api.list(
            x_organization=x_organization,
            assignee=assignee,
            dimension=dimension,
            filter=filter,
            mode=mode,
            name=name,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            project_id=project_id,
            project_name=project_name,
            search=search,
            sort=sort,
            status=status,
            subset=subset,
            tracker_link=tracker_link,
            validation_mode=validation_mode,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
assignee str A simple equality filter for the assignee field [optional]
dimension str A simple equality filter for the dimension field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘project_name’, ’name’, ‘owner’, ‘status’, ‘assignee’, ‘subset’, ‘mode’, ‘dimension’, ’tracker_link’, ‘validation_mode’, ‘id’, ‘project_id’, ‘updated_date’]. There are few examples for complex filtering tasks: - Get all tasks from 1,2,3 projects - { "and" : [{ "in" : [{ "var" : "project_id" }, [1, 2, 3]]}]} - Get all completed tasks from 1 project - { "and": [{ "==": [{ "var" : "status" }, "completed"]}, { "==" : [{ "var" : "project_id"}, 1]}]} [optional]
mode str A simple equality filter for the mode field [optional]
name str A simple equality filter for the name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
project_id int A simple equality filter for the project_id field [optional]
project_name str A simple equality filter for the project_name field [optional]
search str A search term. Available search_fields: (‘project_name’, ’name’, ‘owner’, ‘status’, ‘assignee’, ‘subset’, ‘mode’, ‘dimension’, ’tracker_link’, ‘validation_mode’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘project_name’, ’name’, ‘owner’, ‘status’, ‘assignee’, ‘subset’, ‘mode’, ‘dimension’, ’tracker_link’, ‘validation_mode’, ‘id’, ‘project_id’, ‘updated_date’] [optional]
status str A simple equality filter for the status field [optional]
subset str A simple equality filter for the subset field [optional]
tracker_link str A simple equality filter for the tracker_link field [optional]
validation_mode str A simple equality filter for the validation_mode field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedTaskReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_task_write_request=None, **kwargs )

Update a task

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    patched_task_write_request = PatchedTaskWriteRequest(
        name="name_example",
        project_id=1,
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        id=1,
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                id=1,
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        subset="subset_example",
        target_storage=PatchedTaskWriteRequestTargetStorage(None),
        source_storage=PatchedTaskWriteRequestTargetStorage(None),
    ) # PatchedTaskWriteRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.partial_update(
            id,
            patched_task_write_request=patched_task_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
patched_task_write_request PatchedTaskWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_annotations

partial_update_annotations( action, id, patched_labeled_data_request=None, **kwargs )

Update task annotations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    action = "create" # str | 
    id = 1 # int | A unique integer value identifying this task.
    patched_labeled_data_request = PatchedLabeledDataRequest(
        version=0,
        tags=[
            LabeledImageRequest(
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
            ),
        ],
        shapes=[
            LabeledShapeRequest(
                type=ShapeType("rectangle"),
                occluded=False,
                outside=False,
                z_order=0,
                rotation=0.0,
                points=[
                    3.14,
                ],
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
                elements=[
                    SubLabeledShapeRequest(
                        type=ShapeType("rectangle"),
                        occluded=False,
                        outside=False,
                        z_order=0,
                        rotation=0.0,
                        points=[
                            3.14,
                        ],
                        id=1,
                        frame=0,
                        label_id=0,
                        group=0,
                        source="manual",
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
            ),
        ],
        tracks=[
            LabeledTrackRequest(
                id=1,
                frame=0,
                label_id=0,
                group=0,
                source="manual",
                shapes=[
                    TrackedShapeRequest(
                        type=ShapeType("rectangle"),
                        occluded=False,
                        outside=False,
                        z_order=0,
                        rotation=0.0,
                        points=[
                            3.14,
                        ],
                        id=1,
                        frame=0,
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
                attributes=[
                    AttributeValRequest(
                        spec_id=1,
                        value="value_example",
                    ),
                ],
                elements=[
                    SubLabeledTrackRequest(
                        id=1,
                        frame=0,
                        label_id=0,
                        group=0,
                        source="manual",
                        shapes=[
                            TrackedShapeRequest(
                                type=ShapeType("rectangle"),
                                occluded=False,
                                outside=False,
                                z_order=0,
                                rotation=0.0,
                                points=[
                                    3.14,
                                ],
                                id=1,
                                frame=0,
                                attributes=[
                                    AttributeValRequest(
                                        spec_id=1,
                                        value="value_example",
                                    ),
                                ],
                            ),
                        ],
                        attributes=[
                            AttributeValRequest(
                                spec_id=1,
                                value="value_example",
                            ),
                        ],
                    ),
                ],
            ),
        ],
    ) # PatchedLabeledDataRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.partial_update_annotations(
            action,
            id,
            patched_labeled_data_request=patched_labeled_data_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.partial_update_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
action str
id int A unique integer value identifying this task.
patched_labeled_data_request PatchedLabeledDataRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[LabeledData, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_data_meta

partial_update_data_meta( id, patched_data_meta_write_request=None, **kwargs )

Update metainformation for media files in a task

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    patched_data_meta_write_request = PatchedDataMetaWriteRequest(
        deleted_frames=[
            0,
        ],
    ) # PatchedDataMetaWriteRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.partial_update_data_meta(
            id,
            patched_data_meta_write_request=patched_data_meta_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.partial_update_data_meta(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
patched_data_meta_write_request PatchedDataMetaWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataMetaRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_validation_layout

partial_update_validation_layout( id, patched_task_validation_layout_write_request=None, **kwargs )

Allows updating current validation configuration

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    patched_task_validation_layout_write_request = PatchedTaskValidationLayoutWriteRequest(
        disabled_frames=[
            0,
        ],
        frame_selection_method=None,
        honeypot_real_frames=[
            0,
        ],
    ) # PatchedTaskValidationLayoutWriteRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.partial_update_validation_layout(
            id,
            patched_task_validation_layout_write_request=patched_task_validation_layout_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.partial_update_validation_layout(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
patched_task_validation_layout_write_request PatchedTaskValidationLayoutWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskValidationLayoutRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get task details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        (data, response) = api_client.tasks_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotations

retrieve_annotations( id, action=None, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, **kwargs )

Get task annotations or export them as a dataset in a specific format

Deprecation warning: Utilizing this endpoint ot export annotations as a dataset in a specific format will be deprecated in one of the next releases. Consider using new API: - POST /api/tasks/<task_id>/dataset/export?save_images=False to initiate export process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    use_default_location = True # bool | Use the location that was configured in the task to export annotation (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.tasks_api.retrieve_annotations(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where need to save downloaded dataset [optional]
use_default_location bool Use the location that was configured in the task to export annotation [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationsRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Annotations file is ready to download -
202 Dump of annotations has been started -
400 Exporting without data is not allowed -
405 Format is not available -

retrieve_backup

retrieve_backup( id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Back up a task

Deprecation warning: This endpoint will be deprecated in one of the next releases. Consider using new API: - POST /api/tasks/<task_id>/backup/export to initiate backup process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request’

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    action = "download" # str | Used to start downloading process after backup file had been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded backup (optional)
    use_default_location = True # bool | Use the location that was configured in the task to export backup (optional) if omitted the server will use the default value of True

    try:
        api_client.tasks_api.retrieve_backup(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_backup(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
action str Used to start downloading process after backup file had been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where need to save downloaded backup [optional]
use_default_location bool Use the location that was configured in the task to export backup [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output backup file is ready for downloading -
202 Creating a backup file has been started -
400 Backup of a task without data is not allowed -

retrieve_data

retrieve_data( id, number=None, quality=None, type=None, **kwargs )

Get data of a task

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    number = 1 # int | A unique number value identifying chunk or frame (optional)
    quality = "compressed" # str | Specifies the quality level of the requested data (optional)
    type = "chunk" # str | Specifies the type of the requested data (optional)

    try:
        api_client.tasks_api.retrieve_data(
            id,
            number=number,
            quality=quality,
            type=type,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
number int A unique number value identifying chunk or frame [optional]
quality str Specifies the quality level of the requested data [optional]
type str Specifies the type of the requested data [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Data of a specific type * X-Checksum - Data checksum, applicable for chunks only
* X-Updated-Date - Data update date, applicable for chunks only

retrieve_data_meta

retrieve_data_meta( id, **kwargs )

Get metainformation for media files in a task

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        (data, response) = api_client.tasks_api.retrieve_data_meta(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_data_meta(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataMetaRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_dataset

retrieve_dataset( format, id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Export task as a dataset in a specific format

Deprecation warning: Utilizing this endpoint to export task dataset in a specific format will be deprecated in one of the next releases. Consider using new API: - POST /api/tasks/<task_id>/dataset/export?save_images=True to initiate export process - GET /api/requests/<rq_id> to check process status, where rq_id is request id returned on initializing request

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this task.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    use_default_location = True # bool | Use the location that was configured in task to export annotations (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.tasks_api.retrieve_dataset(
            format,
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this task.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
use_default_location bool Use the location that was configured in task to export annotations [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[file_type, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output file is ready for downloading -
202 Exporting has been started -
400 Exporting without data is not allowed -
405 Format is not available -

retrieve_preview

retrieve_preview( id, **kwargs )

Get a preview image for a task

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        api_client.tasks_api.retrieve_preview(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_preview(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Task image preview -
404 Task image preview not found -

retrieve_status

retrieve_status( id, **kwargs )

Get the creation status of a task

This method is deprecated and will be removed in one of the next releases. To check status of task creation, use new common API for managing background operations: GET /api/requests/?action=create&task_id=<task_id>

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        (data, response) = api_client.tasks_api.retrieve_status(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_status(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqStatus, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_validation_layout

retrieve_validation_layout( id, **kwargs )

Allows getting current validation configuration

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.

    try:
        (data, response) = api_client.tasks_api.retrieve_validation_layout(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.retrieve_validation_layout(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskValidationLayoutRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

update_annotations

update_annotations( id, format=None, rq_id=None, task_annotations_update_request=None, **kwargs )

Replace task annotations / Get annotation import status

To check the status of an import request: After initiating the annotation import, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent PUT /api/tasks/id/annotations requests to track the status of the import.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    task_annotations_update_request = TaskAnnotationsUpdateRequest(None) # TaskAnnotationsUpdateRequest |  (optional)

    try:
        api_client.tasks_api.update_annotations(
            id,
            format=format,
            rq_id=rq_id,
            task_annotations_update_request=task_annotations_update_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.update_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
rq_id str rq id [optional]
task_annotations_update_request TaskAnnotationsUpdateRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 Import has finished -
202 Import is in progress -
405 Format is not available -

2.1.1.21 - UsersApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
destroy DELETE /api/users/{id} Delete a user
list GET /api/users List users
partial_update PATCH /api/users/{id} Update a user
retrieve GET /api/users/{id} Get user details
retrieve_self GET /api/users/self Get details of the current user

destroy

destroy( id, **kwargs )

Delete a user

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this user.

    try:
        api_client.users_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling UsersApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this user.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The user has been deleted -

list

list( x_organization=None, filter=None, first_name=None, is_active=None, last_name=None, org=None, org_id=None, page=None, page_size=None, search=None, sort=None, username=None, **kwargs )

List users

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['username', 'first_name', 'last_name', 'id', 'is_active']. (optional)
    first_name = "first_name_example" # str | A simple equality filter for the first_name field (optional)
    is_active = True # bool | A simple equality filter for the is_active field (optional)
    last_name = "last_name_example" # str | A simple equality filter for the last_name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('username', 'first_name', 'last_name') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['username', 'first_name', 'last_name', 'id', 'is_active'] (optional)
    username = "username_example" # str | A simple equality filter for the username field (optional)

    try:
        (data, response) = api_client.users_api.list(
            x_organization=x_organization,
            filter=filter,
            first_name=first_name,
            is_active=is_active,
            last_name=last_name,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
            username=username,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling UsersApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘username’, ‘first_name’, ’last_name’, ‘id’, ‘is_active’]. [optional]
first_name str A simple equality filter for the first_name field [optional]
is_active bool A simple equality filter for the is_active field [optional]
last_name str A simple equality filter for the last_name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘username’, ‘first_name’, ’last_name’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘username’, ‘first_name’, ’last_name’, ‘id’, ‘is_active’] [optional]
username str A simple equality filter for the username field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedMetaUserList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_user_request=None, **kwargs )

Update a user

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this user.
    patched_user_request = PatchedUserRequest(
        username="A",
        first_name="first_name_example",
        last_name="last_name_example",
        email="email_example",
        groups=[
            "groups_example",
        ],
        is_staff=True,
        is_superuser=True,
        is_active=True,
    ) # PatchedUserRequest |  (optional)

    try:
        (data, response) = api_client.users_api.partial_update(
            id,
            patched_user_request=patched_user_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling UsersApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this user.
patched_user_request PatchedUserRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[MetaUser, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get user details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this user.

    try:
        (data, response) = api_client.users_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling UsersApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this user.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[MetaUser, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_self

retrieve_self( **kwargs )

Get details of the current user

Method returns an instance of a user who is currently authenticated

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.users_api.retrieve_self()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling UsersApi.retrieve_self(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[MetaUser, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.1.22 - WebhooksApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/webhooks Create a webhook
create_deliveries_redelivery POST /api/webhooks/{id}/deliveries/{delivery_id}/redelivery Redeliver a webhook delivery
create_ping POST /api/webhooks/{id}/ping Send a ping webhook
destroy DELETE /api/webhooks/{id} Delete a webhook
list GET /api/webhooks List webhooks
list_deliveries GET /api/webhooks/{id}/deliveries List deliveries for a webhook
partial_update PATCH /api/webhooks/{id} Update a webhook
retrieve GET /api/webhooks/{id} Get webhook details
retrieve_deliveries GET /api/webhooks/{id}/deliveries/{delivery_id} Get details of a webhook delivery
retrieve_events GET /api/webhooks/events List available webhook events
update PUT /api/webhooks/{id} Replace a webhook

create

create( webhook_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Create a webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    webhook_write_request = WebhookWriteRequest(
        target_url="target_url_example",
        description="description_example",
        type=WebhookType("organization"),
        content_type=WebhookContentType("application/json"),
        secret="secret_example",
        is_active=True,
        enable_ssl=True,
        project_id=1,
        events=[
            EventsEnum("create:comment"),
        ],
    ) # WebhookWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.webhooks_api.create(
            webhook_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
webhook_write_request WebhookWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_deliveries_redelivery

create_deliveries_redelivery( delivery_id, id, **kwargs )

Redeliver a webhook delivery

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    delivery_id = "4" # str | 
    id = 1 # int | A unique integer value identifying this webhook.

    try:
        api_client.webhooks_api.create_deliveries_redelivery(
            delivery_id,
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.create_deliveries_redelivery(): %s\n" % e)

Parameters

Name Type Description Notes
delivery_id str
id int A unique integer value identifying this webhook.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 No response body -

create_ping

create_ping( id, **kwargs )

Send a ping webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.

    try:
        (data, response) = api_client.webhooks_api.create_ping(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.create_ping(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookDeliveryRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

destroy

destroy( id, **kwargs )

Delete a webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.

    try:
        api_client.webhooks_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The webhook has been deleted -

list

list( x_organization=None, filter=None, org=None, org_id=None, owner=None, page=None, page_size=None, project_id=None, search=None, sort=None, target_url=None, type=None, **kwargs )

List webhooks

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['target_url', 'owner', 'type', 'description', 'id', 'project_id', 'updated_date']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    project_id = 1 # int | A simple equality filter for the project_id field (optional)
    search = "search_example" # str | A search term. Available search_fields: ('target_url', 'owner', 'type', 'description') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['target_url', 'owner', 'type', 'description', 'id', 'project_id', 'updated_date'] (optional)
    target_url = "target_url_example" # str | A simple equality filter for the target_url field (optional)
    type = "organization" # str | A simple equality filter for the type field (optional)

    try:
        (data, response) = api_client.webhooks_api.list(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            project_id=project_id,
            search=search,
            sort=sort,
            target_url=target_url,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [’target_url’, ‘owner’, ’type’, ‘description’, ‘id’, ‘project_id’, ‘updated_date’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
project_id int A simple equality filter for the project_id field [optional]
search str A search term. Available search_fields: (’target_url’, ‘owner’, ’type’, ‘description’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [’target_url’, ‘owner’, ’type’, ‘description’, ‘id’, ‘project_id’, ‘updated_date’] [optional]
target_url str A simple equality filter for the target_url field [optional]
type str A simple equality filter for the type field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedWebhookReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

list_deliveries

list_deliveries( id, page=None, page_size=None, **kwargs )

List deliveries for a webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)

    try:
        (data, response) = api_client.webhooks_api.list_deliveries(
            id,
            page=page,
            page_size=page_size,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.list_deliveries(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedWebhookDeliveryReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_webhook_write_request=None, **kwargs )

Update a webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.
    patched_webhook_write_request = PatchedWebhookWriteRequest(
        target_url="target_url_example",
        description="description_example",
        content_type=WebhookContentType("application/json"),
        secret="secret_example",
        is_active=True,
        enable_ssl=True,
        events=[
            EventsEnum("create:comment"),
        ],
    ) # PatchedWebhookWriteRequest |  (optional)

    try:
        (data, response) = api_client.webhooks_api.partial_update(
            id,
            patched_webhook_write_request=patched_webhook_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.
patched_webhook_write_request PatchedWebhookWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Get webhook details

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.

    try:
        (data, response) = api_client.webhooks_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_deliveries

retrieve_deliveries( delivery_id, id, **kwargs )

Get details of a webhook delivery

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    delivery_id = "4" # str | 
    id = 1 # int | A unique integer value identifying this webhook.

    try:
        (data, response) = api_client.webhooks_api.retrieve_deliveries(
            delivery_id,
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.retrieve_deliveries(): %s\n" % e)

Parameters

Name Type Description Notes
delivery_id str
id int A unique integer value identifying this webhook.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookDeliveryRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_events

retrieve_events( type=None, **kwargs )

List available webhook events

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    type = "type_example" # str | Type of webhook (optional)

    try:
        (data, response) = api_client.webhooks_api.retrieve_events(
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.retrieve_events(): %s\n" % e)

Parameters

Name Type Description Notes
type str Type of webhook [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Events, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

update

update( id, webhook_write_request, **kwargs )

Replace a webhook

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this webhook.
    webhook_write_request = WebhookWriteRequest(
        target_url="target_url_example",
        description="description_example",
        type=WebhookType("organization"),
        content_type=WebhookContentType("application/json"),
        secret="secret_example",
        is_active=True,
        enable_ssl=True,
        project_id=1,
        events=[
            EventsEnum("create:comment"),
        ],
    ) # WebhookWriteRequest | 

    try:
        (data, response) = api_client.webhooks_api.update(
            id,
            webhook_write_request,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling WebhooksApi.update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this webhook.
webhook_write_request WebhookWriteRequest

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[WebhookRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authentication

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

2.1.2 - Models

2.1.2.1 - About class reference

Properties

Name Type Description Notes
name str
description str
version str

2.1.2.2 - AcceptInvitationRead class reference

Properties

Name Type Description Notes
organization_slug str

2.1.2.3 - AnalyticsReport class reference

Properties

Name Type Description Notes
created_date datetime
target AnalyticsReportTargetEnum
statistics [Metric]
job_id int [optional]
task_id int [optional]
project_id int [optional]

2.1.2.4 - AnalyticsReportCreateRequest class reference

Properties

Name Type Description Notes
job_id int [optional]
task_id int [optional]
project_id int [optional]

2.1.2.5 - AnalyticsReportTargetEnum class reference

  • `job` - JOB * `task` - TASK * `project` - PROJECT

Properties

Name Type Description Notes
value str * job - JOB * task - TASK * project - PROJECT must be one of [“job”, “task”, “project”, ]

2.1.2.6 - AnnotationConflict class reference

Properties

Name Type Description Notes
annotation_ids [AnnotationId]
id int [optional] [readonly]
frame int [optional] [readonly]
type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
report_id int [optional] [readonly]
severity bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]

2.1.2.7 - AnnotationConflictTypeEnum class reference

  • `missing_annotation` - MISSING_ANNOTATION * `extra_annotation` - EXTRA_ANNOTATION * `mismatching_label` - MISMATCHING_LABEL * `low_overlap` - LOW_OVERLAP * `mismatching_direction` - MISMATCHING_DIRECTION * `mismatching_attributes` - MISMATCHING_ATTRIBUTES * `mismatching_groups` - MISMATCHING_GROUPS * `covered_annotation` - COVERED_ANNOTATION

Properties

Name Type Description Notes
value str * missing_annotation - MISSING_ANNOTATION * extra_annotation - EXTRA_ANNOTATION * mismatching_label - MISMATCHING_LABEL * low_overlap - LOW_OVERLAP * mismatching_direction - MISMATCHING_DIRECTION * mismatching_attributes - MISMATCHING_ATTRIBUTES * mismatching_groups - MISMATCHING_GROUPS * covered_annotation - COVERED_ANNOTATION must be one of [“missing_annotation”, “extra_annotation”, “mismatching_label”, “low_overlap”, “mismatching_direction”, “mismatching_attributes”, “mismatching_groups”, “covered_annotation”, ]

2.1.2.8 - AnnotationFileRequest class reference

Properties

Name Type Description Notes
annotation_file file_type

2.1.2.9 - AnnotationGuideRead class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
task_id int, none_type [optional] [readonly]
project_id int, none_type [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
markdown str [optional] [readonly]

2.1.2.10 - AnnotationGuideWriteRequest class reference

Properties

Name Type Description Notes
task_id int, none_type [optional]
project_id int, none_type [optional]
markdown str [optional]

2.1.2.11 - AnnotationId class reference

Properties

Name Type Description Notes
obj_id int [optional] [readonly]
job_id int [optional] [readonly]
type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
shape_type AnnotationIdShapeType [optional]

2.1.2.12 - AnnotationIdShapeType class reference

Properties

Name Type Description Notes

2.1.2.13 - AnnotationIdTypeEnum class reference

  • `tag` - TAG * `shape` - SHAPE * `track` - TRACK

Properties

Name Type Description Notes
value str * tag - TAG * shape - SHAPE * track - TRACK must be one of [“tag”, “shape”, “track”, ]

2.1.2.14 - AnnotationsRead class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImage] [optional] if omitted the server will use the default value of []
shapes [LabeledShape] [optional] if omitted the server will use the default value of []
tracks [LabeledTrack] [optional] if omitted the server will use the default value of []

2.1.2.15 - AssetRead class reference

Properties

Name Type Description Notes
filename str
uuid str [optional] [readonly]
created_date datetime [optional] [readonly]
owner BasicUser [optional]
guide_id int [optional] [readonly]

2.1.2.16 - Attribute class reference

Properties

Name Type Description Notes
name str
mutable bool
input_type InputTypeEnum
values [str]
id int [optional]
default_value str [optional]

2.1.2.17 - AttributeRequest class reference

Properties

Name Type Description Notes
name str
mutable bool
input_type InputTypeEnum
values [str]
id int [optional]
default_value str [optional]

2.1.2.18 - AttributeVal class reference

Properties

Name Type Description Notes
spec_id int
value str

2.1.2.19 - AttributeValRequest class reference

Properties

Name Type Description Notes
spec_id int
value str

2.1.2.20 - BackupWriteRequest class reference

Properties

Name Type Description Notes
project_file file_type [optional]

2.1.2.21 - BasicOrganization class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
slug str [optional] [readonly]

2.1.2.22 - BasicUser class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
url str [optional] [readonly]
id int [optional] [readonly]
first_name str [optional]
last_name str [optional]

2.1.2.23 - BasicUserRequest class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_name str [optional]
last_name str [optional]

2.1.2.24 - BinaryOperation class reference

Properties

Name Type Description Notes
operator OperatorEnum
left str, none_type The name of the data series used as the left (first) operand of the binary operation. [optional]
right str, none_type The name of the data series used as the right (second) operand of the binary operation. [optional]

2.1.2.25 - ChunkType class reference

  • `video` - VIDEO * `imageset` - IMAGESET * `list` - LIST

Properties

Name Type Description Notes
value str * video - VIDEO * imageset - IMAGESET * list - LIST must be one of [“video”, “imageset”, “list”, ]

2.1.2.26 - ClientEvents class reference

Properties

Name Type Description Notes
timestamp datetime
events [Event] [optional] if omitted the server will use the default value of []

2.1.2.27 - ClientEventsRequest class reference

Properties

Name Type Description Notes
timestamp datetime
events [EventRequest] [optional] if omitted the server will use the default value of []
previous_event ClientEventsRequestPreviousEvent [optional]

2.1.2.28 - ClientEventsRequestPreviousEvent class reference

Properties

Name Type Description Notes
scope str
timestamp datetime
obj_name str, none_type [optional]
obj_id int, none_type [optional]
obj_val str, none_type [optional]
source str, none_type [optional]
count int, none_type [optional]
duration int [optional] if omitted the server will use the default value of 0
project_id int, none_type [optional]
task_id int, none_type [optional]
job_id int, none_type [optional]
user_id int, none_type [optional]
user_name str, none_type [optional]
user_email str, none_type [optional]
org_id int, none_type [optional]
org_slug str, none_type [optional]
payload str, none_type [optional]

2.1.2.29 - CloudStorageContent class reference

Properties

Name Type Description Notes
content [FileInfo]
next str, none_type This token is used to continue listing files in the bucket. [optional]

2.1.2.30 - CloudStorageRead class reference

Properties

Name Type Description Notes
provider_type ProviderTypeEnum
resource str
display_name str
credentials_type CredentialsTypeEnum
id int [optional] [readonly]
owner CloudStorageReadOwner [optional]
manifests [str] [optional] if omitted the server will use the default value of []
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
specific_attributes str [optional]
description str [optional]
organization int, none_type [optional] [readonly]

2.1.2.31 - CloudStorageReadOwner class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
url str [optional] [readonly]
id int [optional] [readonly]
first_name str [optional]
last_name str [optional]

2.1.2.32 - CloudStorageWriteRequest class reference

Properties

Name Type Description Notes
provider_type ProviderTypeEnum
resource str
display_name str
credentials_type CredentialsTypeEnum
owner BasicUserRequest [optional]
session_token str [optional]
account_name str [optional]
key str [optional]
secret_key str [optional]
connection_string str [optional]
key_file file_type [optional]
specific_attributes str [optional]
description str [optional]
manifests [str] [optional] if omitted the server will use the default value of []

2.1.2.33 - CommentRead class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
issue int [optional] [readonly]
owner CloudStorageReadOwner [optional]
message str [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]

2.1.2.34 - CommentsSummary class reference

Properties

Name Type Description Notes
count int [optional] if omitted the server will use the default value of 0
url str [optional] [readonly]

2.1.2.35 - CommentWriteRequest class reference

Properties

Name Type Description Notes
issue int
message str [optional]

2.1.2.36 - CredentialsTypeEnum class reference

  • `KEY_SECRET_KEY_PAIR` - KEY_SECRET_KEY_PAIR * `ACCOUNT_NAME_TOKEN_PAIR` - ACCOUNT_NAME_TOKEN_PAIR * `KEY_FILE_PATH` - KEY_FILE_PATH * `ANONYMOUS_ACCESS` - ANONYMOUS_ACCESS * `CONNECTION_STRING` - CONNECTION_STRING

Properties

Name Type Description Notes
value str * KEY_SECRET_KEY_PAIR - KEY_SECRET_KEY_PAIR * ACCOUNT_NAME_TOKEN_PAIR - ACCOUNT_NAME_TOKEN_PAIR * KEY_FILE_PATH - KEY_FILE_PATH * ANONYMOUS_ACCESS - ANONYMOUS_ACCESS * CONNECTION_STRING - CONNECTION_STRING must be one of [“KEY_SECRET_KEY_PAIR”, “ACCOUNT_NAME_TOKEN_PAIR”, “KEY_FILE_PATH”, “ANONYMOUS_ACCESS”, “CONNECTION_STRING”, ]

2.1.2.37 - DataFrame class reference

Properties

Name Type Description Notes
value float
date date

2.1.2.38 - DataMetaRead class reference

Properties

Name Type Description Notes
chunks_updated_date datetime
image_quality int
frames [FrameMeta], none_type
deleted_frames [int]
chunk_size int, none_type [optional] [readonly]
size int The number of frames included. Deleted frames do not affect this value. [optional] [readonly]
start_frame int [optional] [readonly]
stop_frame int [optional] [readonly]
frame_filter str [optional] [readonly]
included_frames [int], none_type A list of valid frame ids. The None value means all frames are included. [optional]

2.1.2.39 - DataRequest class reference

Read more about parameters here: https://docs.cvat.ai/docs/manual/basics/create_an_annotation_task/#advanced-configuration

Properties

Name Type Description Notes
image_quality int Image quality to use during annotation
chunk_size int, none_type Maximum number of frames per chunk [optional]
start_frame int First frame index [optional]
stop_frame int Last frame index [optional]
frame_filter str Frame filter. The only supported syntax is: ‘step=N’ [optional]
client_files [file_type] Uploaded files. Must contain all files from job_file_mapping if job_file_mapping is not empty. [optional] if omitted the server will use the default value of []
server_files [str] Paths to files from a file share mounted on the server, or from a cloud storage. Must contain all files from job_file_mapping if job_file_mapping is not empty. [optional] if omitted the server will use the default value of []
remote_files [str] Direct download URLs for files. Must contain all files from job_file_mapping if job_file_mapping is not empty. [optional] if omitted the server will use the default value of []
use_zip_chunks bool When true, video chunks will be represented as zip archives with decoded video frames. When false, video chunks are represented as video segments [optional] if omitted the server will use the default value of False
server_files_exclude [str] Paths to files and directories from a file share mounted on the server, or from a cloud storage that should be excluded from the directories specified in server_files. This option cannot be used together with filename_pattern. The server_files_exclude parameter cannot be used to exclude a part of dataset from an archive. Examples: Exclude all files from subfolder ‘sub/sub_1/sub_2’and single file ‘sub/image.jpg’ from specified folder: server_files = [‘sub/’], server_files_exclude = [‘sub/sub_1/sub_2/’, ‘sub/image.jpg’] Exclude all cloud storage files with prefix ‘sub’ from the content of manifest file: server_files = [‘manifest.jsonl’], server_files_exclude = [‘sub/’] [optional] if omitted the server will use the default value of []
cloud_storage_id int, none_type If not null, the files referenced by server_files will be retrieved from the cloud storage with the specified ID. The cloud storages applicable depend on the context. In the user sandbox, only the user sandbox cloud storages can be used. In an organization, only the organization cloud storages can be used. [optional]
use_cache bool Enable or disable task data chunk caching for the task. Read more: https://docs.cvat.ai/docs/manual/advanced/data_on_fly/ [optional] if omitted the server will use the default value of False
copy_data bool Copy data from the server file share to CVAT during the task creation. This will create a copy of the data, making the server independent from the file share availability [optional] if omitted the server will use the default value of False
storage_method StorageMethod [optional]
storage StorageType [optional]
sorting_method SortingMethod [optional]
filename_pattern str, none_type A filename filter for cloud storage files listed in the manifest. Supports fnmatch wildcards. Read more: https://docs.python.org/3/library/fnmatch.html [optional]
job_file_mapping [[str]] Represents a file-to-job mapping. Useful to specify a custom job configuration during task creation. This option is not compatible with most other job split-related options. Files in the jobs must not overlap or repeat. Job file mapping files must be a subset of the input files. If directories are specified in server_files, all files obtained by recursive search in the specified directories will be used as input files. In case of missing items in the input files, an error will be raised. Example: [ ["file1.jpg", "file2.jpg"], # job #1 files ["file3.png"], # job #2 files ["file4.jpg", "file5.png", "file6.bmp"], # job #3 files ] [optional]
upload_file_order [str] Allows to specify file order for client_file uploads. Only valid with the "predefined" sorting method selected. To state that the input files are sent in the correct order, pass an empty list. If you want to send files in an arbitrary order and reorder them afterwards on the server, pass the list of file names in the required order. [optional]
validation_params DataRequestValidationParams [optional]

2.1.2.40 - DataRequestValidationParams class reference

Properties

Name Type Description Notes
mode ValidationMode
frame_selection_method FrameSelectionMethod
random_seed int The seed value for the random number generator. The same value will produce the same frame sets. Applicable only to random frame selection methods. By default, a random value is used. [optional]
frames [str] The list of file names to be included in the validation set. Applicable only to the "manual" frame selection method. Can only be used for images. [optional]
frame_count int The number of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method [optional]
frame_share float The share of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method [optional]
frames_per_job_count int The number of frames to be included in the validation set from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]
frames_per_job_share float The share of frames to be included in the validation set from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]

2.1.2.41 - DataResponse class reference

Properties

Name Type Description Notes
rq_id str Request id [optional]

2.1.2.42 - DatasetFileRequest class reference

Properties

Name Type Description Notes
dataset_file file_type

2.1.2.43 - DatasetFormat class reference

Properties

Name Type Description Notes
name str
ext str
version str
enabled bool
dimension str

2.1.2.44 - DatasetFormats class reference

Properties

Name Type Description Notes
importers [DatasetFormat]
exporters [DatasetFormat]

2.1.2.45 - DatasetWriteRequest class reference

Properties

Name Type Description Notes
dataset_file file_type [optional]

2.1.2.46 - DefaultViewEnum class reference

  • `numeric` - NUMERIC * `histogram` - HISTOGRAM

Properties

Name Type Description Notes
value str * numeric - NUMERIC * histogram - HISTOGRAM must be one of [“numeric”, “histogram”, ]

2.1.2.47 - Event class reference

Properties

Name Type Description Notes
scope str
timestamp datetime
obj_name str, none_type [optional]
obj_id int, none_type [optional]
obj_val str, none_type [optional]
source str, none_type [optional]
count int, none_type [optional]
duration int [optional] if omitted the server will use the default value of 0
project_id int, none_type [optional]
task_id int, none_type [optional]
job_id int, none_type [optional]
user_id int, none_type [optional]
user_name str, none_type [optional]
user_email str, none_type [optional]
org_id int, none_type [optional]
org_slug str, none_type [optional]
payload str, none_type [optional]

2.1.2.48 - EventRequest class reference

Properties

Name Type Description Notes
scope str
timestamp datetime
obj_name str, none_type [optional]
obj_id int, none_type [optional]
obj_val str, none_type [optional]
source str, none_type [optional]
count int, none_type [optional]
duration int [optional] if omitted the server will use the default value of 0
project_id int, none_type [optional]
task_id int, none_type [optional]
job_id int, none_type [optional]
user_id int, none_type [optional]
user_name str, none_type [optional]
user_email str, none_type [optional]
org_id int, none_type [optional]
org_slug str, none_type [optional]
payload str, none_type [optional]

2.1.2.49 - Events class reference

Properties

Name Type Description Notes
webhook_type WebhookType
events [EventsEnum]

2.1.2.50 - EventsEnum class reference

  • `create:comment` - CREATE:COMMENT * `create:invitation` - CREATE:INVITATION * `create:issue` - CREATE:ISSUE * `create:job` - CREATE:JOB * `create:membership` - CREATE:MEMBERSHIP * `create:project` - CREATE:PROJECT * `create:task` - CREATE:TASK * `delete:comment` - DELETE:COMMENT * `delete:invitation` - DELETE:INVITATION * `delete:issue` - DELETE:ISSUE * `delete:job` - DELETE:JOB * `delete:membership` - DELETE:MEMBERSHIP * `delete:organization` - DELETE:ORGANIZATION * `delete:project` - DELETE:PROJECT * `delete:task` - DELETE:TASK * `update:comment` - UPDATE:COMMENT * `update:issue` - UPDATE:ISSUE * `update:job` - UPDATE:JOB * `update:membership` - UPDATE:MEMBERSHIP * `update:organization` - UPDATE:ORGANIZATION * `update:project` - UPDATE:PROJECT * `update:task` - UPDATE:TASK

Properties

Name Type Description Notes
value str * create:comment - CREATE:COMMENT * create:invitation - CREATE:INVITATION * create:issue - CREATE:ISSUE * create:job - CREATE:JOB * create:membership - CREATE:MEMBERSHIP * create:project - CREATE:PROJECT * create:task - CREATE:TASK * delete:comment - DELETE:COMMENT * delete:invitation - DELETE:INVITATION * delete:issue - DELETE:ISSUE * delete:job - DELETE:JOB * delete:membership - DELETE:MEMBERSHIP * delete:organization - DELETE:ORGANIZATION * delete:project - DELETE:PROJECT * delete:task - DELETE:TASK * update:comment - UPDATE:COMMENT * update:issue - UPDATE:ISSUE * update:job - UPDATE:JOB * update:membership - UPDATE:MEMBERSHIP * update:organization - UPDATE:ORGANIZATION * update:project - UPDATE:PROJECT * update:task - UPDATE:TASK must be one of [“create:comment”, “create:invitation”, “create:issue”, “create:job”, “create:membership”, “create:project”, “create:task”, “delete:comment”, “delete:invitation”, “delete:issue”, “delete:job”, “delete:membership”, “delete:organization”, “delete:project”, “delete:task”, “update:comment”, “update:issue”, “update:job”, “update:membership”, “update:organization”, “update:project”, “update:task”, ]

2.1.2.51 - FileInfo class reference

Properties

Name Type Description Notes
name str
type FileInfoTypeEnum
mime_type str

2.1.2.52 - FileInfoTypeEnum class reference

  • `REG` - REG * `DIR` - DIR

Properties

Name Type Description Notes
value str * REG - REG * DIR - DIR must be one of [“REG”, “DIR”, ]

2.1.2.53 - FrameMeta class reference

Properties

Name Type Description Notes
width int
height int
name str
related_files int
has_related_context bool [optional] [readonly]

2.1.2.54 - FrameSelectionMethod class reference

  • `random_uniform` - RANDOM_UNIFORM * `random_per_job` - RANDOM_PER_JOB * `manual` - MANUAL

Properties

Name Type Description Notes
value str * random_uniform - RANDOM_UNIFORM * random_per_job - RANDOM_PER_JOB * manual - MANUAL must be one of [“random_uniform”, “random_per_job”, “manual”, ]

2.1.2.55 - FunctionCall class reference

Properties

Name Type Description Notes
id str Request id
function FunctionCallParams
status str, none_type
enqueued datetime, none_type
started datetime, none_type
ended datetime, none_type
progress int, none_type [optional] if omitted the server will use the default value of 0
exc_info str, none_type [optional]

2.1.2.56 - FunctionCallParams class reference

Properties

Name Type Description Notes
id str, none_type The name of the function
task int, none_type The id of the task
threshold float, none_type
job int The id of the job [optional]

2.1.2.57 - FunctionCallRequest class reference

Properties

Name Type Description Notes
function str The name of the function to execute
task int The id of the task to be annotated
job int The id of the job to be annotated [optional]
max_distance int [optional]
threshold float [optional]
cleanup bool Whether existing annotations should be removed [optional] if omitted the server will use the default value of False
conv_mask_to_poly bool Deprecated; use conv_mask_to_poly instead [optional]
conv_mask_to_poly bool Convert mask shapes to polygons [optional]
mapping {str: (LabelMappingEntryRequest,)} Label mapping from the model to the task labels [optional]

2.1.2.58 - GranularityEnum class reference

  • `day` - DAY * `week` - WEEK * `month` - MONTH

Properties

Name Type Description Notes
value str * day - DAY * week - WEEK * month - MONTH must be one of [“day”, “week”, “month”, ]

2.1.2.59 - InputTypeEnum class reference

  • `checkbox` - CHECKBOX * `radio` - RADIO * `number` - NUMBER * `text` - TEXT * `select` - SELECT

Properties

Name Type Description Notes
value str * checkbox - CHECKBOX * radio - RADIO * number - NUMBER * text - TEXT * select - SELECT must be one of [“checkbox”, “radio”, “number”, “text”, “select”, ]

2.1.2.60 - InvitationRead class reference

Properties

Name Type Description Notes
owner CloudStorageReadOwner
role RoleEnum
user BasicUser
organization int
organization_info BasicOrganization
key str [optional] [readonly]
created_date datetime [optional] [readonly]
expired bool, none_type [optional] [readonly]

2.1.2.61 - InvitationWriteRequest class reference

Properties

Name Type Description Notes
role RoleEnum
email str

2.1.2.62 - IssueRead class reference

Properties

Name Type Description Notes
position [float]
comments CommentsSummary
id int [optional] [readonly]
frame int [optional] [readonly]
job int [optional] [readonly]
owner CloudStorageReadOwner [optional]
assignee CloudStorageReadOwner [optional]
created_date datetime, none_type [optional] [readonly]
updated_date datetime, none_type [optional] [readonly]
resolved bool [optional] [readonly]

2.1.2.63 - IssuesSummary class reference

Properties

Name Type Description Notes
url str [optional] [readonly]
count int [optional] [readonly]

2.1.2.64 - IssueWriteRequest class reference

Properties

Name Type Description Notes
frame int
position [float]
job int
message str
assignee int, none_type [optional]
resolved bool [optional]

2.1.2.65 - JobAnnotationsUpdateRequest class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImageRequest] [optional] if omitted the server will use the default value of []
shapes [LabeledShapeRequest] [optional] if omitted the server will use the default value of []
tracks [LabeledTrackRequest] [optional] if omitted the server will use the default value of []
annotation_file file_type [optional]

2.1.2.66 - JobRead class reference

Properties

Name Type Description Notes
issues IssuesSummary
labels LabelsSummary
url str [optional] [readonly]
id int [optional] [readonly]
task_id int [optional] [readonly]
project_id int, none_type [optional] [readonly]
assignee JobReadAssignee [optional]
guide_id int, none_type [optional] [readonly]
dimension str [optional] [readonly]
bug_tracker str, none_type [optional] [readonly]
status bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
stage bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
state bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
mode str [optional] [readonly]
frame_count int [optional] [readonly]
start_frame int [optional] [readonly]
stop_frame int [optional] [readonly]
data_chunk_size int, none_type [optional] [readonly]
data_compressed_chunk_type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
data_original_chunk_type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
organization int, none_type [optional] [readonly]
target_storage JobReadTargetStorage [optional]
source_storage JobReadTargetStorage [optional]
assignee_updated_date datetime, none_type [optional] [readonly]

2.1.2.67 - JobReadAssignee class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
url str [optional] [readonly]
id int [optional] [readonly]
first_name str [optional]
last_name str [optional]

2.1.2.68 - JobReadTargetStorage class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.69 - JobsSummary class reference

Properties

Name Type Description Notes
completed int, none_type
validation int, none_type
count int [optional] if omitted the server will use the default value of 0
url str [optional] [readonly]

2.1.2.70 - JobStage class reference

  • `annotation` - ANNOTATION * `validation` - VALIDATION * `acceptance` - ACCEPTANCE

Properties

Name Type Description Notes
value str * annotation - ANNOTATION * validation - VALIDATION * acceptance - ACCEPTANCE must be one of [“annotation”, “validation”, “acceptance”, ]

2.1.2.71 - JobStatus class reference

  • `annotation` - ANNOTATION * `validation` - VALIDATION * `completed` - COMPLETED

Properties

Name Type Description Notes
value str * annotation - ANNOTATION * validation - VALIDATION * completed - COMPLETED must be one of [“annotation”, “validation”, “completed”, ]

2.1.2.72 - JobType class reference

  • `annotation` - ANNOTATION * `ground_truth` - GROUND_TRUTH

Properties

Name Type Description Notes
value str * annotation - ANNOTATION * ground_truth - GROUND_TRUTH must be one of [“annotation”, “ground_truth”, ]

2.1.2.73 - JobValidationLayoutRead class reference

Properties

Name Type Description Notes
honeypot_count int [optional]
honeypot_frames [int] The list of frame ids for honeypots in the job [optional]
honeypot_real_frames [int] The list of real (validation) frame ids for honeypots in the job [optional]

2.1.2.74 - JobWriteRequest class reference

Properties

Name Type Description Notes
type JobType
task_id int
assignee int, none_type [optional]
stage JobStage [optional]
state OperationStatus [optional]
frame_selection_method FrameSelectionMethod [optional]
frame_count int The number of frames included in the GT job. Applicable only to the "random_uniform" frame selection method [optional]
frame_share float The share of frames included in the GT job. Applicable only to the "random_uniform" frame selection method [optional]
frames_per_job_count int The number of frames included in the GT job from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]
frames_per_job_share float The share of frames included in the GT job from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]
random_seed int The seed value for the random number generator. The same value will produce the same frame sets. Applicable only to random frame selection methods. By default, a random value is used. [optional]
seed int Deprecated. Use random_seed instead. [optional]
frames [int] The list of frame ids. Applicable only to the "manual" frame selection method [optional]

2.1.2.75 - Label class reference

Properties

Name Type Description Notes
name str
id int [optional]
color str The hex value for the RGB color. Will be generated automatically, unless specified explicitly. [optional]
attributes [Attribute] The list of attributes. If you want to remove an attribute, you need to recreate the label and specify the remaining attributes. [optional] if omitted the server will use the default value of []
type str Associated annotation type for this label [optional]
svg str [optional]
sublabels [Sublabel] [optional]
project_id int, none_type [optional] [readonly]
task_id int, none_type [optional] [readonly]
parent_id int, none_type [optional] [readonly]
has_parent bool [optional] [readonly]

2.1.2.76 - LabeledData class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImage] [optional] if omitted the server will use the default value of []
shapes [LabeledShape] [optional] if omitted the server will use the default value of []
tracks [LabeledTrack] [optional] if omitted the server will use the default value of []

2.1.2.77 - LabeledDataRequest class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImageRequest] [optional] if omitted the server will use the default value of []
shapes [LabeledShapeRequest] [optional] if omitted the server will use the default value of []
tracks [LabeledTrackRequest] [optional] if omitted the server will use the default value of []

2.1.2.78 - LabeledImage class reference

Properties

Name Type Description Notes
frame int
label_id int
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeVal] [optional] if omitted the server will use the default value of []

2.1.2.79 - LabeledImageRequest class reference

Properties

Name Type Description Notes
frame int
label_id int
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []

2.1.2.80 - LabeledShape class reference

Properties

Name Type Description Notes
type ShapeType
frame int
label_id int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeVal] [optional] if omitted the server will use the default value of []
elements [SubLabeledShape] [optional]

2.1.2.81 - LabeledShapeRequest class reference

Properties

Name Type Description Notes
type ShapeType
frame int
label_id int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []
elements [SubLabeledShapeRequest] [optional]

2.1.2.82 - LabeledTrack class reference

Properties

Name Type Description Notes
frame int
label_id int
shapes [TrackedShape]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeVal] [optional] if omitted the server will use the default value of []
elements [SubLabeledTrack] [optional]

2.1.2.83 - LabeledTrackRequest class reference

Properties

Name Type Description Notes
frame int
label_id int
shapes [TrackedShapeRequest]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []
elements [SubLabeledTrackRequest] [optional]

2.1.2.84 - LabelMappingEntryRequest class reference

Properties

Name Type Description Notes
name str
attributes {str: (str,)} [optional]
sublabels {str: (SublabelMappingEntryRequest,)} Label mapping for from the model to the task sublabels within a parent label [optional]

2.1.2.85 - LabelsSummary class reference

Properties

Name Type Description Notes
url str [optional] [readonly]

2.1.2.86 - LocationEnum class reference

  • `cloud_storage` - CLOUD_STORAGE * `local` - LOCAL

Properties

Name Type Description Notes
value str * cloud_storage - CLOUD_STORAGE * local - LOCAL must be one of [“cloud_storage”, “local”, ]

2.1.2.87 - LoginSerializerExRequest class reference

Properties

Name Type Description Notes
password str
username str [optional]
email str [optional]

2.1.2.88 - MembershipRead class reference

Properties

Name Type Description Notes
user BasicUser
id int [optional] [readonly]
organization int [optional] [readonly]
is_active bool [optional] [readonly]
joined_date datetime, none_type [optional] [readonly]
role bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
invitation str, none_type [optional] [readonly]

2.1.2.89 - MetaUser class reference

Properties

Name Type Description Notes
url str [optional] [readonly]
id int [optional] [readonly]
first_name str [optional]
last_name str [optional]
email str [optional]
is_staff bool Designates whether the user can log into this admin site. [optional]
is_superuser bool Designates that this user has all permissions without explicitly assigning them. [optional]
is_active bool Designates whether this user should be treated as active. Unselect this instead of deleting accounts. [optional]
last_login datetime, none_type [optional] [readonly]
date_joined datetime [optional] [readonly]
has_analytics_access bool [optional] [readonly]
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. [optional]
groups [str] [optional]

2.1.2.90 - Metric class reference

Properties

Name Type Description Notes
name str
title str
description str
default_view DefaultViewEnum
data_series {str: ([DataFrame],)}
transformations [Transformation]
granularity MetricGranularity [optional]

2.1.2.91 - MetricGranularity class reference

Properties

Name Type Description Notes

2.1.2.92 - NullEnum class reference

Properties

Name Type Description Notes
value str must be one of [“null”, ]

2.1.2.93 - OnlineFunctionCallRequest class reference

Properties

Name Type Description Notes
job int [optional]
task int [optional]

2.1.2.94 - OperationStatus class reference

  • `new` - NEW * `in progress` - IN_PROGRESS * `completed` - COMPLETED * `rejected` - REJECTED

Properties

Name Type Description Notes
value str * new - NEW * in progress - IN_PROGRESS * completed - COMPLETED * rejected - REJECTED must be one of [“new”, “in progress”, “completed”, “rejected”, ]

2.1.2.95 - OperatorEnum class reference

  • `+` - ADDITION * `-` - SUBTRACTION * `*` - MULTIPLICATION * `/` - DIVISION

Properties

Name Type Description Notes
value str * + - ADDITION * - - SUBTRACTION * * - MULTIPLICATION * / - DIVISION must be one of ["+", “-”, “*”, “/”, ]

2.1.2.96 - OrganizationRead class reference

Properties

Name Type Description Notes
owner CloudStorageReadOwner
id int [optional] [readonly]
slug str [optional] [readonly]
name str [optional] [readonly]
description str [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
contact {str: (bool, date, datetime, dict, float, int, list, str, none_type)} [optional] [readonly]

2.1.2.97 - OrganizationWriteRequest class reference

Properties

Name Type Description Notes
slug str
name str [optional]
description str [optional]
contact {str: (bool, date, datetime, dict, float, int, list, str, none_type)} [optional]

2.1.2.98 - PaginatedAnnotationConflictList class reference

Properties

Name Type Description Notes
count int
results [AnnotationConflict]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.99 - PaginatedCloudStorageReadList class reference

Properties

Name Type Description Notes
count int
results [CloudStorageRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.100 - PaginatedCommentReadList class reference

Properties

Name Type Description Notes
count int
results [CommentRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.101 - PaginatedInvitationReadList class reference

Properties

Name Type Description Notes
count int
results [InvitationRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.102 - PaginatedIssueReadList class reference

Properties

Name Type Description Notes
count int
results [IssueRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.103 - PaginatedJobReadList class reference

Properties

Name Type Description Notes
count int
results [JobRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.104 - PaginatedLabelList class reference

Properties

Name Type Description Notes
count int
results [Label]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.105 - PaginatedMembershipReadList class reference

Properties

Name Type Description Notes
count int
results [MembershipRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.106 - PaginatedMetaUserList class reference

Properties

Name Type Description Notes
count int
results [MetaUser]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.107 - PaginatedOrganizationReadList class reference

Properties

Name Type Description Notes
count int
results [OrganizationRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.108 - PaginatedProjectReadList class reference

Properties

Name Type Description Notes
count int
results [ProjectRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.109 - PaginatedQualityReportList class reference

Properties

Name Type Description Notes
count int
results [QualityReport]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.110 - PaginatedQualitySettingsList class reference

Properties

Name Type Description Notes
count int
results [QualitySettings]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.111 - PaginatedRequestList class reference

Properties

Name Type Description Notes
count int
results [Request]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.112 - PaginatedTaskReadList class reference

Properties

Name Type Description Notes
count int
results [TaskRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.113 - PaginatedWebhookDeliveryReadList class reference

Properties

Name Type Description Notes
count int
results [WebhookDeliveryRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.114 - PaginatedWebhookReadList class reference

Properties

Name Type Description Notes
count int
results [WebhookRead]
next str, none_type [optional]
previous str, none_type [optional]

2.1.2.115 - PasswordChangeRequest class reference

Properties

Name Type Description Notes
old_password str
new_password1 str
new_password2 str

2.1.2.116 - PasswordResetConfirmRequest class reference

Serializer for confirming a password reset attempt.

Properties

Name Type Description Notes
new_password1 str
new_password2 str
uid str
token str

2.1.2.117 - PasswordResetSerializerExRequest class reference

Serializer for requesting a password reset e-mail.

Properties

Name Type Description Notes
email str

2.1.2.118 - PatchedAnnotationGuideWriteRequest class reference

Properties

Name Type Description Notes
task_id int, none_type [optional]
project_id int, none_type [optional]
markdown str [optional]

2.1.2.119 - PatchedCloudStorageWriteRequest class reference

Properties

Name Type Description Notes
provider_type ProviderTypeEnum [optional]
resource str [optional]
display_name str [optional]
owner BasicUserRequest [optional]
credentials_type CredentialsTypeEnum [optional]
session_token str [optional]
account_name str [optional]
key str [optional]
secret_key str [optional]
connection_string str [optional]
key_file file_type [optional]
specific_attributes str [optional]
description str [optional]
manifests [str] [optional] if omitted the server will use the default value of []

2.1.2.120 - PatchedCommentWriteRequest class reference

Properties

Name Type Description Notes
message str [optional]

2.1.2.121 - PatchedDataMetaWriteRequest class reference

Properties

Name Type Description Notes
deleted_frames [int] [optional]

2.1.2.122 - PatchedInvitationWriteRequest class reference

Properties

Name Type Description Notes
role RoleEnum [optional]
email str [optional]

2.1.2.123 - PatchedIssueWriteRequest class reference

Properties

Name Type Description Notes
position [float] [optional]
assignee int, none_type [optional]
resolved bool [optional]

2.1.2.124 - PatchedJobDataMetaWriteRequest class reference

Properties

Name Type Description Notes
deleted_frames [int] [optional]

2.1.2.125 - PatchedJobValidationLayoutWriteRequest class reference

Properties

Name Type Description Notes
frame_selection_method bool, date, datetime, dict, float, int, list, str, none_type The method to use for frame selection of new real frames for honeypots in the job * random_uniform - RANDOM_UNIFORM * random_per_job - RANDOM_PER_JOB * manual - MANUAL [optional]
honeypot_real_frames [int] The list of frame ids. Applicable only to the "manual" frame selection method [optional]

2.1.2.126 - PatchedJobWriteRequest class reference

Properties

Name Type Description Notes
assignee int, none_type [optional]
stage JobStage [optional]
state OperationStatus [optional]

2.1.2.127 - PatchedLabeledDataRequest class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImageRequest] [optional] if omitted the server will use the default value of []
shapes [LabeledShapeRequest] [optional] if omitted the server will use the default value of []
tracks [LabeledTrackRequest] [optional] if omitted the server will use the default value of []

2.1.2.128 - PatchedLabelRequest class reference

Properties

Name Type Description Notes
id int [optional]
name str [optional]
color str The hex value for the RGB color. Will be generated automatically, unless specified explicitly. [optional]
attributes [AttributeRequest] The list of attributes. If you want to remove an attribute, you need to recreate the label and specify the remaining attributes. [optional] if omitted the server will use the default value of []
deleted bool Delete the label. Only applicable in the PATCH methods of a project or a task. [optional]
type str Associated annotation type for this label [optional]
svg str [optional]
sublabels [SublabelRequest] [optional]

2.1.2.129 - PatchedMembershipWriteRequest class reference

Properties

Name Type Description Notes
role RoleEnum [optional]

2.1.2.130 - PatchedOrganizationWriteRequest class reference

Properties

Name Type Description Notes
slug str [optional]
name str [optional]
description str [optional]
contact {str: (bool, date, datetime, dict, float, int, list, str, none_type)} [optional]

2.1.2.131 - PatchedProjectWriteRequest class reference

Properties

Name Type Description Notes
name str [optional]
labels [PatchedLabelRequest] [optional] if omitted the server will use the default value of []
owner_id int, none_type [optional]
assignee_id int, none_type [optional]
bug_tracker str [optional]
target_storage PatchedProjectWriteRequestTargetStorage [optional]
source_storage PatchedProjectWriteRequestTargetStorage [optional]

2.1.2.132 - PatchedProjectWriteRequestTargetStorage class reference

Properties

Name Type Description Notes
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.133 - PatchedQualitySettingsRequest class reference

Properties

Name Type Description Notes
target_metric bool, date, datetime, dict, float, int, list, str, none_type The primary metric used for quality estimation * accuracy - ACCURACY * precision - PRECISION * recall - RECALL [optional]
target_metric_threshold float Defines the minimal quality requirements in terms of the selected target metric. [optional]
max_validations_per_job int The maximum number of job validation attempts for the job assignee. The job can be automatically accepted if the job quality is above the required threshold, defined by the target threshold parameter. [optional]
iou_threshold float Used for distinction between matched / unmatched shapes [optional]
oks_sigma float Like IoU threshold, but for points. The percent of the bbox side, used as the radius of the circle around the GT point, where the checked point is expected to be. For boxes with different width and height, the "side" is computed as a geometric mean of the width and height. Read more: https://cocodataset.org/#keypoints-eval [optional]
point_size_base bool, date, datetime, dict, float, int, list, str, none_type When comparing point annotations (including both separate points and point groups), the OKS sigma parameter defines matching area for each GT point based to the object size. The point size base parameter allows to configure how to determine the object size. If image_size, the image size is used. Useful if each point annotation represents a separate object or boxes grouped with points do not represent object boundaries. If group_bbox_size, the object size is based on the point group bbox size. Useful if each point group represents an object or there is a bbox grouped with points, representing the object size. * image_size - IMAGE_SIZE * group_bbox_size - GROUP_BBOX_SIZE [optional]
line_thickness float Thickness of polylines, relatively to the (image area) ^ 0.5. The distance to the boundary around the GT line, inside of which the checked line points should be [optional]
low_overlap_threshold float Used for distinction between strong / weak (low_overlap) matches [optional]
compare_line_orientation bool Enables or disables polyline orientation comparison [optional]
line_orientation_threshold float The minimal gain in the GT IoU between the given and reversed line directions to consider the line inverted. Only used when the ‘compare_line_orientation’ parameter is true [optional]
compare_groups bool Enables or disables annotation group checks [optional]
group_match_threshold float Minimal IoU for groups to be considered matching. Only used when the ‘compare_groups’ parameter is true [optional]
check_covered_annotations bool Check for partially-covered annotations, useful in segmentation tasks [optional]
object_visibility_threshold float Minimal visible area percent of the spatial annotations (polygons, masks) for reporting covered annotations. Only used when the ‘object_visibility_threshold’ parameter is true [optional]
panoptic_comparison bool Use only the visible part of the masks and polygons in comparisons [optional]
compare_attributes bool Enables or disables annotation attribute comparison [optional]
match_empty_frames bool Count empty frames as matching. This affects target metrics like accuracy in cases there are no annotations. If disabled, frames without annotations are counted as not matching (accuracy is 0). If enabled, accuracy will be 1 instead. This will also add virtual annotations to empty frames in the comparison results. [optional] if omitted the server will use the default value of False

2.1.2.134 - PatchedTaskValidationLayoutWriteRequest class reference

Properties

Name Type Description Notes
disabled_frames [int] The list of frame ids to be excluded from validation [optional]
frame_selection_method bool, date, datetime, dict, float, int, list, str, none_type The method to use for frame selection of new real frames for honeypots in the task * random_uniform - RANDOM_UNIFORM * random_per_job - RANDOM_PER_JOB * manual - MANUAL [optional]
honeypot_real_frames [int] The list of frame ids. Applicable only to the "manual" frame selection method [optional]

2.1.2.135 - PatchedTaskWriteRequest class reference

Properties

Name Type Description Notes
name str [optional]
project_id int, none_type [optional]
owner_id int, none_type [optional]
assignee_id int, none_type [optional]
bug_tracker str [optional]
labels [PatchedLabelRequest] [optional]
subset str [optional]
target_storage PatchedTaskWriteRequestTargetStorage [optional]
source_storage PatchedTaskWriteRequestTargetStorage [optional]

2.1.2.136 - PatchedTaskWriteRequestTargetStorage class reference

Properties

Name Type Description Notes
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.137 - PatchedUserRequest class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. [optional]
first_name str [optional]
last_name str [optional]
email str [optional]
groups [str] [optional]
is_staff bool Designates whether the user can log into this admin site. [optional]
is_superuser bool Designates that this user has all permissions without explicitly assigning them. [optional]
is_active bool Designates whether this user should be treated as active. Unselect this instead of deleting accounts. [optional]

2.1.2.138 - PatchedWebhookWriteRequest class reference

Properties

Name Type Description Notes
target_url str [optional]
description str [optional]
content_type WebhookContentType [optional]
secret str [optional]
is_active bool [optional]
enable_ssl bool [optional]
events [EventsEnum] [optional]

2.1.2.139 - Plugins class reference

Properties

Name Type Description Notes
git_integration bool
analytics bool
models bool
predict bool

2.1.2.140 - PointSizeBaseEnum class reference

  • `image_size` - IMAGE_SIZE * `group_bbox_size` - GROUP_BBOX_SIZE

Properties

Name Type Description Notes
value str * image_size - IMAGE_SIZE * group_bbox_size - GROUP_BBOX_SIZE must be one of [“image_size”, “group_bbox_size”, ]

2.1.2.141 - ProjectFileRequest class reference

Properties

Name Type Description Notes
project_file file_type

2.1.2.142 - ProjectRead class reference

Properties

Name Type Description Notes
tasks TasksSummary
labels LabelsSummary
url str [optional] [readonly]
id int [optional] [readonly]
name str [optional] [readonly]
owner JobReadAssignee [optional]
assignee JobReadAssignee [optional]
guide_id int, none_type [optional]
bug_tracker str [optional] [readonly]
task_subsets [str] [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
status bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
dimension str, none_type [optional] [readonly]
organization int, none_type [optional] [readonly]
target_storage ProjectReadTargetStorage [optional]
source_storage ProjectReadTargetStorage [optional]
assignee_updated_date datetime, none_type [optional] [readonly]

2.1.2.143 - ProjectReadTargetStorage class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.144 - ProjectWriteRequest class reference

Properties

Name Type Description Notes
name str
labels [PatchedLabelRequest] [optional] if omitted the server will use the default value of []
owner_id int, none_type [optional]
assignee_id int, none_type [optional]
bug_tracker str [optional]
target_storage PatchedProjectWriteRequestTargetStorage [optional]
source_storage PatchedProjectWriteRequestTargetStorage [optional]

2.1.2.145 - ProviderTypeEnum class reference

  • `AWS_S3_BUCKET` - AWS_S3 * `AZURE_CONTAINER` - AZURE_CONTAINER * `GOOGLE_DRIVE` - GOOGLE_DRIVE * `GOOGLE_CLOUD_STORAGE` - GOOGLE_CLOUD_STORAGE

Properties

Name Type Description Notes
value str * AWS_S3_BUCKET - AWS_S3 * AZURE_CONTAINER - AZURE_CONTAINER * GOOGLE_DRIVE - GOOGLE_DRIVE * GOOGLE_CLOUD_STORAGE - GOOGLE_CLOUD_STORAGE must be one of [“AWS_S3_BUCKET”, “AZURE_CONTAINER”, “GOOGLE_DRIVE”, “GOOGLE_CLOUD_STORAGE”, ]

2.1.2.146 - QualityReport class reference

Properties

Name Type Description Notes
target QualityReportTarget
summary QualityReportSummary
id int [optional] [readonly]
job_id int, none_type [optional] [readonly]
task_id int, none_type [optional] [readonly]
parent_id int, none_type [optional] [readonly]
created_date datetime [optional] [readonly]
target_last_updated datetime [optional] [readonly]
gt_last_updated datetime [optional] [readonly]
assignee JobReadAssignee [optional]

2.1.2.147 - QualityReportCreateRequest class reference

Properties

Name Type Description Notes
task_id int [optional]

2.1.2.148 - QualityReportSummary class reference

Properties

Name Type Description Notes
frame_count int
frame_share float
conflict_count int
warning_count int
error_count int
conflicts_by_type {str: (int,)}
valid_count int
ds_count int
gt_count int
total_count int
accuracy float
precision float
recall float

2.1.2.149 - QualityReportTarget class reference

  • `job` - JOB * `task` - TASK

Properties

Name Type Description Notes
value str * job - JOB * task - TASK must be one of [“job”, “task”, ]

2.1.2.150 - QualitySettings class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
task_id int [optional] [readonly]
target_metric bool, date, datetime, dict, float, int, list, str, none_type The primary metric used for quality estimation * accuracy - ACCURACY * precision - PRECISION * recall - RECALL [optional]
target_metric_threshold float Defines the minimal quality requirements in terms of the selected target metric. [optional]
max_validations_per_job int The maximum number of job validation attempts for the job assignee. The job can be automatically accepted if the job quality is above the required threshold, defined by the target threshold parameter. [optional]
iou_threshold float Used for distinction between matched / unmatched shapes [optional]
oks_sigma float Like IoU threshold, but for points. The percent of the bbox side, used as the radius of the circle around the GT point, where the checked point is expected to be. For boxes with different width and height, the "side" is computed as a geometric mean of the width and height. Read more: https://cocodataset.org/#keypoints-eval [optional]
point_size_base bool, date, datetime, dict, float, int, list, str, none_type When comparing point annotations (including both separate points and point groups), the OKS sigma parameter defines matching area for each GT point based to the object size. The point size base parameter allows to configure how to determine the object size. If image_size, the image size is used. Useful if each point annotation represents a separate object or boxes grouped with points do not represent object boundaries. If group_bbox_size, the object size is based on the point group bbox size. Useful if each point group represents an object or there is a bbox grouped with points, representing the object size. * image_size - IMAGE_SIZE * group_bbox_size - GROUP_BBOX_SIZE [optional]
line_thickness float Thickness of polylines, relatively to the (image area) ^ 0.5. The distance to the boundary around the GT line, inside of which the checked line points should be [optional]
low_overlap_threshold float Used for distinction between strong / weak (low_overlap) matches [optional]
compare_line_orientation bool Enables or disables polyline orientation comparison [optional]
line_orientation_threshold float The minimal gain in the GT IoU between the given and reversed line directions to consider the line inverted. Only used when the ‘compare_line_orientation’ parameter is true [optional]
compare_groups bool Enables or disables annotation group checks [optional]
group_match_threshold float Minimal IoU for groups to be considered matching. Only used when the ‘compare_groups’ parameter is true [optional]
check_covered_annotations bool Check for partially-covered annotations, useful in segmentation tasks [optional]
object_visibility_threshold float Minimal visible area percent of the spatial annotations (polygons, masks) for reporting covered annotations. Only used when the ‘object_visibility_threshold’ parameter is true [optional]
panoptic_comparison bool Use only the visible part of the masks and polygons in comparisons [optional]
compare_attributes bool Enables or disables annotation attribute comparison [optional]
match_empty_frames bool Count empty frames as matching. This affects target metrics like accuracy in cases there are no annotations. If disabled, frames without annotations are counted as not matching (accuracy is 0). If enabled, accuracy will be 1 instead. This will also add virtual annotations to empty frames in the comparison results. [optional] if omitted the server will use the default value of False

2.1.2.151 - RegisterSerializerEx class reference

Properties

Name Type Description Notes
username str
email str [optional]
first_name str [optional]
last_name str [optional]
email_verification_required bool [optional] [readonly]
key str, none_type [optional] [readonly]

2.1.2.152 - RegisterSerializerExRequest class reference

Properties

Name Type Description Notes
username str
password1 str
password2 str
email str [optional]
first_name str [optional]
last_name str [optional]

2.1.2.153 - Request class reference

Properties

Name Type Description Notes
status RequestStatus
id str
operation RequestDataOperation
created_date datetime
message str [optional] [readonly]
progress float, none_type [optional] [readonly]
started_date datetime, none_type [optional]
finished_date datetime, none_type [optional]
expiry_date datetime, none_type [optional] [readonly]
owner RequestOwner [optional]
result_url str, none_type [optional]
result_id int, none_type [optional]

2.1.2.154 - RequestDataOperation class reference

Properties

Name Type Description Notes
type str
target RequestDataOperationTargetEnum
project_id int, none_type [optional]
task_id int, none_type [optional]
job_id int, none_type [optional]
format str, none_type [optional]
function_id str, none_type [optional]

2.1.2.155 - RequestDataOperationTargetEnum class reference

  • `project` - Project * `task` - Task * `job` - Job

Properties

Name Type Description Notes
value str * project - Project * task - Task * job - Job must be one of [“project”, “task”, “job”, ]

2.1.2.156 - RequestOwner class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
id int [optional] [readonly]

2.1.2.157 - RequestStatus class reference

  • `queued` - Queued * `started` - Started * `failed` - Failed * `finished` - Finished

Properties

Name Type Description Notes
value str * queued - Queued * started - Started * failed - Failed * finished - Finished must be one of [“queued”, “started”, “failed”, “finished”, ]

2.1.2.158 - RestAuthDetail class reference

Properties

Name Type Description Notes
detail str [optional] [readonly]

2.1.2.159 - RoleEnum class reference

  • `worker` - Worker * `supervisor` - Supervisor * `maintainer` - Maintainer * `owner` - Owner

Properties

Name Type Description Notes
value str * worker - Worker * supervisor - Supervisor * maintainer - Maintainer * owner - Owner must be one of [“worker”, “supervisor”, “maintainer”, “owner”, ]

2.1.2.160 - RqId class reference

Properties

Name Type Description Notes
rq_id str Request id

2.1.2.161 - RqStatus class reference

Properties

Name Type Description Notes
state RqStatusStateEnum
message str [optional] if omitted the server will use the default value of ""
progress float [optional] if omitted the server will use the default value of 0.0

2.1.2.162 - RqStatusStateEnum class reference

  • `Queued` - Queued * `Started` - Started * `Finished` - Finished * `Failed` - Failed

Properties

Name Type Description Notes
value str * Queued - Queued * Started - Started * Finished - Finished * Failed - Failed must be one of [“Queued”, “Started”, “Finished”, “Failed”, ]

2.1.2.163 - SeverityEnum class reference

  • `warning` - WARNING * `error` - ERROR

Properties

Name Type Description Notes
value str * warning - WARNING * error - ERROR must be one of [“warning”, “error”, ]

2.1.2.164 - ShapeType class reference

  • `rectangle` - RECTANGLE * `polygon` - POLYGON * `polyline` - POLYLINE * `points` - POINTS * `ellipse` - ELLIPSE * `cuboid` - CUBOID * `mask` - MASK * `skeleton` - SKELETON

Properties

Name Type Description Notes
value str * rectangle - RECTANGLE * polygon - POLYGON * polyline - POLYLINE * points - POINTS * ellipse - ELLIPSE * cuboid - CUBOID * mask - MASK * skeleton - SKELETON must be one of [“rectangle”, “polygon”, “polyline”, “points”, “ellipse”, “cuboid”, “mask”, “skeleton”, ]

2.1.2.165 - SigningRequest class reference

Properties

Name Type Description Notes
url str

2.1.2.166 - SortingMethod class reference

  • `lexicographical` - LEXICOGRAPHICAL * `natural` - NATURAL * `predefined` - PREDEFINED * `random` - RANDOM

Properties

Name Type Description Notes
value str * lexicographical - LEXICOGRAPHICAL * natural - NATURAL * predefined - PREDEFINED * random - RANDOM must be one of [“lexicographical”, “natural”, “predefined”, “random”, ]

2.1.2.167 - Storage class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.168 - StorageMethod class reference

  • `cache` - CACHE * `file_system` - FILE_SYSTEM

Properties

Name Type Description Notes
value str * cache - CACHE * file_system - FILE_SYSTEM must be one of [“cache”, “file_system”, ]

2.1.2.169 - StorageRequest class reference

Properties

Name Type Description Notes
location LocationEnum [optional]
cloud_storage_id int, none_type [optional]

2.1.2.170 - StorageType class reference

  • `cloud_storage` - CLOUD_STORAGE * `local` - LOCAL * `share` - SHARE

Properties

Name Type Description Notes
value str * cloud_storage - CLOUD_STORAGE * local - LOCAL * share - SHARE must be one of [“cloud_storage”, “local”, “share”, ]

2.1.2.171 - Sublabel class reference

Properties

Name Type Description Notes
name str
id int [optional]
color str The hex value for the RGB color. Will be generated automatically, unless specified explicitly. [optional]
attributes [Attribute] The list of attributes. If you want to remove an attribute, you need to recreate the label and specify the remaining attributes. [optional] if omitted the server will use the default value of []
type str Associated annotation type for this label [optional]
has_parent bool [optional]

2.1.2.172 - SubLabeledShape class reference

Properties

Name Type Description Notes
type ShapeType
frame int
label_id int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeVal] [optional] if omitted the server will use the default value of []

2.1.2.173 - SubLabeledShapeRequest class reference

Properties

Name Type Description Notes
type ShapeType
frame int
label_id int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []

2.1.2.174 - SubLabeledTrack class reference

Properties

Name Type Description Notes
frame int
label_id int
shapes [TrackedShape]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeVal] [optional] if omitted the server will use the default value of []

2.1.2.175 - SubLabeledTrackRequest class reference

Properties

Name Type Description Notes
frame int
label_id int
shapes [TrackedShapeRequest]
id int, none_type [optional]
group int, none_type [optional]
source str [optional] if omitted the server will use the default value of “manual”
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []

2.1.2.176 - SublabelMappingEntryRequest class reference

Properties

Name Type Description Notes
name str
attributes {str: (str,)} [optional]

2.1.2.177 - SublabelRequest class reference

Properties

Name Type Description Notes
name str
id int [optional]
color str The hex value for the RGB color. Will be generated automatically, unless specified explicitly. [optional]
attributes [AttributeRequest] The list of attributes. If you want to remove an attribute, you need to recreate the label and specify the remaining attributes. [optional] if omitted the server will use the default value of []
type str Associated annotation type for this label [optional]
has_parent bool [optional]

2.1.2.178 - TargetMetricEnum class reference

  • `accuracy` - ACCURACY * `precision` - PRECISION * `recall` - RECALL

Properties

Name Type Description Notes
value str * accuracy - ACCURACY * precision - PRECISION * recall - RECALL must be one of [“accuracy”, “precision”, “recall”, ]

2.1.2.179 - TaskAnnotationsUpdateRequest class reference

Properties

Name Type Description Notes
version int [optional] if omitted the server will use the default value of 0
tags [LabeledImageRequest] [optional] if omitted the server will use the default value of []
shapes [LabeledShapeRequest] [optional] if omitted the server will use the default value of []
tracks [LabeledTrackRequest] [optional] if omitted the server will use the default value of []
annotation_file file_type [optional]

2.1.2.180 - TaskAnnotationsWriteRequest class reference

Properties

Name Type Description Notes
annotation_file file_type [optional]

2.1.2.181 - TaskFileRequest class reference

Properties

Name Type Description Notes
task_file file_type

2.1.2.182 - TaskRead class reference

Properties

Name Type Description Notes
jobs JobsSummary
labels LabelsSummary
url str [optional] [readonly]
id int [optional] [readonly]
name str [optional] [readonly]
project_id int, none_type [optional]
mode str [optional] [readonly]
owner CloudStorageReadOwner [optional]
assignee CloudStorageReadOwner [optional]
bug_tracker str [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
overlap int, none_type [optional] [readonly]
segment_size int [optional] [readonly]
status bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
data_chunk_size int, none_type [optional] [readonly]
data_compressed_chunk_type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
guide_id int, none_type [optional]
data_original_chunk_type bool, date, datetime, dict, float, int, list, str, none_type [optional] [readonly]
size int [optional] [readonly]
image_quality int [optional] [readonly]
data int [optional] [readonly]
dimension str [optional]
subset str [optional] [readonly]
organization int, none_type [optional] [readonly]
target_storage JobReadTargetStorage [optional]
source_storage JobReadTargetStorage [optional]
assignee_updated_date datetime, none_type [optional] [readonly]
validation_mode str, none_type Describes how the task validation is performed. Configured at task creation [optional]

2.1.2.183 - TasksSummary class reference

Properties

Name Type Description Notes
count int [optional] if omitted the server will use the default value of 0
url str [optional] [readonly]

2.1.2.184 - TaskValidationLayoutRead class reference

Properties

Name Type Description Notes
mode TaskValidationLayoutReadMode [optional]
frames_per_job_count int, none_type [optional] [readonly]
validation_frames [int] The list of frame ids to be used for validation [optional]
disabled_frames [int] The list of frame ids excluded from validation [optional]
honeypot_count int [optional]
honeypot_frames [int] The list of frame ids for all honeypots in the task [optional]
honeypot_real_frames [int] The list of real (validation) frame ids for all honeypots in the task [optional]

2.1.2.185 - TaskValidationLayoutReadMode class reference

Properties

Name Type Description Notes

2.1.2.186 - TaskWriteRequest class reference

Properties

Name Type Description Notes
name str
project_id int, none_type [optional]
owner_id int, none_type [optional]
assignee_id int, none_type [optional]
bug_tracker str [optional]
overlap int, none_type [optional]
segment_size int [optional]
labels [PatchedLabelRequest] [optional]
subset str [optional]
target_storage PatchedTaskWriteRequestTargetStorage [optional]
source_storage PatchedTaskWriteRequestTargetStorage [optional]

2.1.2.187 - Token class reference

Serializer for Token model.

Properties

Name Type Description Notes
key str

2.1.2.188 - TrackedShape class reference

Properties

Name Type Description Notes
type ShapeType
frame int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
attributes [AttributeVal] [optional] if omitted the server will use the default value of []

2.1.2.189 - TrackedShapeRequest class reference

Properties

Name Type Description Notes
type ShapeType
frame int
occluded bool [optional] if omitted the server will use the default value of False
outside bool [optional] if omitted the server will use the default value of False
z_order int [optional] if omitted the server will use the default value of 0
rotation float [optional] if omitted the server will use the default value of 0.0
points [float] [optional]
id int, none_type [optional]
attributes [AttributeValRequest] [optional] if omitted the server will use the default value of []

2.1.2.190 - Transformation class reference

Properties

Name Type Description Notes
name str
binary TransformationBinary [optional]

2.1.2.191 - TransformationBinary class reference

Properties

Name Type Description Notes
operator OperatorEnum
left str, none_type The name of the data series used as the left (first) operand of the binary operation. [optional]
right str, none_type The name of the data series used as the right (second) operand of the binary operation. [optional]

2.1.2.192 - User class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
groups [str]
url str [optional] [readonly]
id int [optional] [readonly]
first_name str [optional]
last_name str [optional]
email str [optional]
is_staff bool Designates whether the user can log into this admin site. [optional]
is_superuser bool Designates that this user has all permissions without explicitly assigning them. [optional]
is_active bool Designates whether this user should be treated as active. Unselect this instead of deleting accounts. [optional]
last_login datetime, none_type [optional] [readonly]
date_joined datetime [optional] [readonly]
has_analytics_access bool [optional] [readonly]

2.1.2.193 - UserIdentifiers class reference

Properties

Name Type Description Notes
username str Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
id int [optional] [readonly]

2.1.2.194 - ValidationMode class reference

  • `gt` - GT * `gt_pool` - GT_POOL

Properties

Name Type Description Notes
value str * gt - GT * gt_pool - GT_POOL must be one of [“gt”, “gt_pool”, ]

2.1.2.195 - ValidationParamsRequest class reference

Properties

Name Type Description Notes
mode ValidationMode
frame_selection_method FrameSelectionMethod
random_seed int The seed value for the random number generator. The same value will produce the same frame sets. Applicable only to random frame selection methods. By default, a random value is used. [optional]
frames [str] The list of file names to be included in the validation set. Applicable only to the "manual" frame selection method. Can only be used for images. [optional]
frame_count int The number of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method [optional]
frame_share float The share of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method [optional]
frames_per_job_count int The number of frames to be included in the validation set from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]
frames_per_job_share float The share of frames to be included in the validation set from each annotation job. Applicable only to the "random_per_job" frame selection method [optional]

2.1.2.196 - WebhookContentType class reference

  • `application/json` - JSON

Properties

Name Type Description Notes
value str * application/json - JSON defaults to “application/json”, must be one of [“application/json”, ]

2.1.2.197 - WebhookDeliveryRead class reference

Properties

Name Type Description Notes
id int [optional] [readonly]
webhook_id int [optional] [readonly]
event str [optional] [readonly]
status_code int, none_type [optional] [readonly]
redelivery bool [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
changed_fields str [optional] [readonly]
request {str: (bool, date, datetime, dict, float, int, list, str, none_type)} [optional] [readonly]
response {str: (bool, date, datetime, dict, float, int, list, str, none_type)} [optional] [readonly]

2.1.2.198 - WebhookRead class reference

Properties

Name Type Description Notes
type WebhookType
content_type WebhookContentType
id int [optional] [readonly]
url str [optional] [readonly]
target_url str [optional] [readonly]
description str [optional] [readonly]
is_active bool [optional] [readonly]
enable_ssl bool [optional] [readonly]
created_date datetime [optional] [readonly]
updated_date datetime [optional] [readonly]
owner JobReadAssignee [optional]
project_id int, none_type [optional]
organization int, none_type [optional] [readonly]
events [EventsEnum] [optional] [readonly]
last_status int [optional] [readonly]
last_delivery_date datetime [optional] [readonly]

2.1.2.199 - WebhookType class reference

  • `organization` - ORGANIZATION * `project` - PROJECT

Properties

Name Type Description Notes
value str * organization - ORGANIZATION * project - PROJECT must be one of [“organization”, “project”, ]

2.1.2.200 - WebhookWriteRequest class reference

Properties

Name Type Description Notes
target_url str
type WebhookType
events [EventsEnum]
description str [optional]
content_type WebhookContentType [optional]
secret str [optional]
is_active bool [optional]
enable_ssl bool [optional]
project_id int, none_type [optional]

2.2 - Low-level API

Overview

The low-level API is useful if you need to work directly with REST API, but want to have data validation and syntax assistance from your code editor. The code on this layer is autogenerated.

Code of this component is located in cvat_sdk.api_client.

Example

Let’s see how a task with local files can be created. We will use the basic auth to make things simpler.

from time import sleep
from cvat_sdk.api_client import Configuration, ApiClient, models, apis, exceptions

configuration = Configuration(
    host="http://localhost",
    username='YOUR_USERNAME',
    password='YOUR_PASSWORD',
)

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Parameters can be passed as a plain dict with JSON-serialized data
    # or as model objects (from cvat_sdk.api_client.models), including
    # mixed variants.
    #
    # In case of dicts, keys must be the same as members of models.I<ModelName>
    # interfaces and values must be convertible to the corresponding member
    # value types (e.g. a date or string enum value can be parsed from a string).
    #
    # In case of model objects, data must be of the corresponding
    # models.<ModelName> types.
    #
    # Let's use a dict here. It should look like models.ITaskWriteRequest
    task_spec = {
        'name': 'example task',
        "labels": [{
            "name": "car",
            "color": "#ff00ff",
            "attributes": [
                {
                    "name": "a",
                    "mutable": True,
                    "input_type": "number",
                    "default_value": "5",
                    "values": ["4", "5", "6"]
                }
            ]
        }],
    }

    try:
        # Apis can be accessed as ApiClient class members
        # We use different models for input and output data. For input data,
        # models are typically called like "*Request". Output data models have
        # no suffix.
        (task, response) = api_client.tasks_api.create(task_spec)
    except exceptions.ApiException as e:
        # We can catch the basic exception type, or a derived type
        print("Exception when trying to create a task: %s\n" % e)

    # Here we will use models instead of a dict
    task_data = models.DataRequest(
        image_quality=75,
        client_files=[
            open('image1.jpg', 'rb'),
            open('image2.jpg', 'rb'),
        ],
    )

    # If we pass binary file objects, we need to specify content type.
    (result, response) = api_client.tasks_api.create_data(task.id,
        data_request=task_data,
        _content_type="multipart/form-data",

        # we can choose to check the response status manually
        # and disable the response data parsing
        _check_status=False, _parse_response=False
    )
    assert response.status == 202, response.msg

    # Wait till task data is processed
    for _ in range(100):
        request_details, response = api_client.requests_api.retrieve(result.rq_id)
        status, message = request_details.status, request_details.message

        if status.value in {'finished', 'failed'}:
            break
        sleep(0.1)
    assert status.value == 'finished', status.message

    # Update the task object and check the task size
    (task, _) = api_client.tasks_api.retrieve(task.id)
    assert task.size == 4

ApiClient and configuration

The starting point in the low-level API is the cvat_sdk.api_client.ApiClient class. It encapsulates session and connection logic, manages headers and cookies, and provides access to various APIs.

To create an instance of ApiClient, you need to set up a cvat_sdk.api_client.Configuration object and pass it to the ApiClient class constructor. Additional connection-specific options, such as extra headers and cookies can be specified in the class constructor. ApiClient implements the context manager protocol. Typically, you create ApiClient this way:

from cvat_sdk.api_client import ApiClient, Configuration

configuration = Configuration(host="http://localhost")
with ApiClient(configuration) as api_client:
    ...

After creating an ApiClient instance, you can send requests to various server endpoints via *_api member properties and directly, using the rest_client member. Read more about API wrappers below.

Typically, the first thing you do with ApiClient is log in. Read more about authentication options below.

Authentication

CVAT supports 2 authentication options:

  • basic auth, with your username and password
  • token auth, with your API key

Token auth requires a token, which can be obtained after performing the basic auth.

The low-level API supports 2 ways of authentication. You can specify authentication parameters in the Configuration object:

configuration = Configuration(
    username='YOUR_USERNAME',
    password='YOUR_PASSWORD',
)
configuration = Configuration(
    api_key={
        "sessionAuth": "<sessionid cookie value>",
        "csrfAuth": "<csrftoken cookie value>",
        "tokenAuth": "Token <auth key value>",
    }
)

You can perform a regular login using the auth_api member of ApiClient and set the Authorization header using the Token prefix. This way, you’ll be able to obtain API tokens, which can be reused in the future to avoid typing your credentials.

from cvat_sdk.api_client import models

(auth, _) = api_client.auth_api.create_login(
    models.LoginRequest(username=credentials[0], password=credentials[1])
)

assert "sessionid" in api_client.cookies
assert "csrftoken" in api_client.cookies
api_client.set_default_header("Authorization", "Token " + auth.key)

API wrappers

API endpoints are grouped by tags into separate classes in the cvat_sdk.api_client.apis package.

APIs can be accessed as ApiClient object members:

api_client.auth_api.<operation>(...)
api_client.tasks_api.<operation>(...)

And APIs can be instantiated directly like this:

from cvat_sdk.api_client import ApiClient, apis

api_client = ApiClient(...)

auth_api = apis.AuthApi(api_client)
auth_api.<operation>(...)

tasks_api = apis.TasksApi(api_client)
tasks_api.<operation>(...)

For each operation, the API wrapper class has a corresponding <operation>_endpoint member. This member represents the endpoint as a first-class object, which provides metainformation about the endpoint, such as the relative URL of the endpoint, parameter names, types and their placement in the request. It also allows to pass the operation to other functions and invoke it from there.

For a typical server entity like Task, Project, Job etc., the *Api classes provide methods that reflect Create-Read-Update-Delete (CRUD) operations: create, retrieve, list, update, partial_update, delete. The set of available operations depends on the entity type.

You can find the list of the available APIs and their documentation here.

Models

Requests and responses can include data. It can be represented as plain Python data structures and model classes (or models). In CVAT API, model for requests and responses are separated: the request models have the Request suffix in the name, while the response models have no suffix. Models can be found in the cvat_sdk.api_client.models package.

Models can be instantiated like this:

from cvat_sdk.api_client import models

user_model = models.User(...)

Model parameters can be passed as models, or as plain Python data structures. This rule applies recursively, starting from the method parameters. In particular, this means you can pass a dict into a method or into a model constructor, and corresponding fields will be parsed from this data automatically:

task_spec = models.TaskWriteRequest(
    name='example task',
    labels=[
        models.PatchedLabelRequest(
            name="car",
            color="#ff00ff",
            attributes=[
                model.AttributeRequest(
                    name="a",
                    mutable=True,
                    input_type="number",
                    default_value="5",
                    values=["4", "5", "6"]
                )
            ]
        )
    ],
)
api_client.tasks_api.create(task_spec)

Is equivalent to:

api_client.tasks_api.create({
    'name': 'example task',
    "labels": [{
        "name": "car",
        "color": "#ff00ff",
        "attributes": [
            {
                "name": "a",
                "mutable": True,
                "input_type": "number",
                "default_value": "5",
                "values": ["4", "5", "6"]
            }
        ]
    }],
})

You can mix these variants.

Most models provide corresponding interface classes called like I<model name>. They can be used to implement your own classes or describe APIs. They just provide type annotations and descriptions for model fields.

You can export model values to plain Python dicts using the to_dict() method and the cvat_sdk.api_client.model_utils.to_json() function.

You can find the list of the available models and their documentation here.

Sending requests

To send a request to a server endpoint, you need to obtain an instance of the corresponding *Api class. You can find summary about available API classes and supported endpoints here. The *Api instance object allows to send requests to the relevant server endpoints.

By default, all operations return 2 objects: the parsed response data and the response itself.

The first returned value is a model parsed from the response data. If a method does not have any return value, None is always returned as the first value. You can control automatic parsing using the _parse_response method kwarg. When disabled, None is returned.

The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. By default, the status code of the response is checked to be positive. In the case of request failure, an exception is raised by default. This behavior can be controlled by the _check_status method kwarg. If the status is not checked, you will need to manually check the response status code and perform actions needed.

A typical endpoint call looks like this:

from cvat_sdk.api_client import ApiClient, apis

with ApiClient(...) as api_client:
    ...
    (data, response) = api_client.tasks_api.list()
    # process the response ...

Operation parameters can be passed as positional or keyword arguments. API methods provide extra common arguments which control invocation logic:

  • _parse_response (bool) - Allows to enable and disable response data parsing. When enabled, the response data is parsed into a model or a basic type and returned as the first value. When disabled, the response is not parsed, and None is returned. Can be useful, for instance, if you need to parse data manually, or if you expect an error in the response. Default is True.
  • _check_status (bool) - Allows to enable or disable response status checks. When enabled, the response status code is checked to be positive as defined in the HTTP standards. In the case of negative status, an exception is raised. Default is True.
  • _validate_inputs (bool): specifies if type checking should be done on the data sent to the server. Default is True.
  • _validate_outputs (bool): specifies if type checking should be done on the data received from the server. Default is True.
  • _request_timeout (None | int | float | Tuple[int | float, int | float]) - Allows to control timeouts. If one number is provided, it will be the total request timeout. It can also be a tuple with (connection, read) timeouts. Default is None, which means no timeout.
  • _content_type (None | str) - Allows to specify the Content-Type header value for the request. Endpoints can support different content types and behave differently depending on the value. For file uploads _content_type="multipart/form-data" must be specified. Read more about file uploads here. Default is application/json.

NOTE: the API is autogenerated. In some cases the server API schema may be incomplete or underspecified. Please report to us all the problems found. A typical problem is that a response data can’t be parsed automatically due to the incorrect schema. In this case, the simplest workaround is to disable response parsing using the _parse_response=False method argument.

You can find many examples of API client usage in REST API tests here.

Organizations

To create resource in the context of an organization, use one of these method arguments:

  • org - The unique organization slug
  • org_id- The organization id
...
(task, response) = api_client.tasks_api.create(task_spec, org_id=org_id)

Paginated responses

There are several endpoints that allow to request multiple server entities. Typically, these endpoints are called list_.... When there are lots of data, the responses can be paginated to reduce server load. If an endpoint returns paginated data, a single page is returned per request. In some cases all entries need to be retrieved. CVAT doesn’t provide specific API or parameters for this, so the solution is to write a loop to collect and join data from multiple requests. SDK provides an utility function for this at cvat_sdk.core.helpers.get_paginated_collection().

Example:

from cvat_sdk.core.helpers import get_paginated_collection

...
project_tasks = get_paginated_collection(
    api_client.projects_api.list_tasks_endpoint,
    id=project_id,
)

Binary data in requests and responses

At the moment, sending and receiving binary data - such as files - can be difficult via the low-level SDK API. Please use the following recommendations.

Sending data

By default, requests use the application/json content type, which is a text type. However, it’s inefficient to send binary data in this encoding, and the data passed won’t be converted automatically. If you need to send files or other binary data, please specify _content_type="multipart/form-data" in the request parameters:

Example:

(result, response) = api_client.tasks_api.create_data(
    id=42,
    data_request=models.DataRequest(
        client_files=[
            open("image.jpg", 'rb')
        ],
        image_quality=70,
    ),
    _content_type="multipart/form-data", # required
)

Please also note that if there are complex fields in the data (such as nested lists or dicts), they, in turn, cannot be encoded as multipart/form-data, so the recommended solution is to split fields into files and others, and send them in different requests with different content types:

Example:

data = {
    'client_files': [...], # a list of binary files
    'image_quality': ..., # a simple type - int
    'job_file_mapping': [...], # a complex type - list
}

# Initialize uploading
api_client.tasks_api.create_data(
    id=42,
    data_request=models.DataRequest(image_quality=data["image_quality"]),
    upload_start=True,
)

# Upload binary data
api_client.tasks_api.create_data(
    id=42,
    data_request=models.DataRequest(
        client_files=data.pop("client_files"),
        image_quality=data["image_quality"],
    ),
    upload_multiple=True,
    _content_type="multipart/form-data",
)

# Finalize the uploading and send the remaining fields
api_client.tasks_api.create_data(
    id=42,
    data_request=models.DataRequest(**data),
    upload_finish=True,
)

Receiving data

Receiving binary files can also be difficult with the low-level API. To avoid unexpected behavior, it is recommended to specify _parse_response=False in the request parameters. In this case, SDK will not try to parse models from responses, and the response data can be fetched directly from the response:

from time import sleep

# Export a task as a dataset
while True:
    (_, response) = api_client.tasks_api.retrieve_dataset(
        id=42,
        format='COCO 1.0',
        _parse_response=False,
    )
    if response.status == HTTPStatus.CREATED:
        break

    sleep(interval)

(_, response) = api_client.tasks_api.retrieve_dataset(
    id=42,
    format='COCO 1.0',
    action="download",
    _parse_response=False,
)

# Save the resulting file
with open('output_file', 'wb') as output_file:
    output_file.write(response.data)

Different versions of API endpoints

The cloudstorages/id/content REST API endpoint

Warning: The retrieve_content method of cloudstorages_api will be deprecated in 2.5.0 version. We recommend using retrieve_content_v2 method that matches to revised API when using SDK. For backward compatibility, we continue to support the prior interface version until version 2.6.0 is released.

Here you can find the example how to get the bucket content using new method retrieve_content_v2.

from pprint import pprint

from cvat_sdk.api_client import ApiClient, Configuration

next_token = None
files, prefixes = [], []
prefix = ""

with ApiClient(
    configuration=Configuration(host=BASE_URL, username=user, password=password)
) as api_client:
    while True:
        data, response = api_client.cloudstorages_api.retrieve_content_v2(
            cloud_storage_id,
            **({"prefix": prefix} if prefix else {}),
            **({"next_token": next_token} if next_token else {}),
        )
        # the data will have the following structure:
        # {'content': [
        #     {'mime_type': <image|video|archive|pdf|DIR>, 'name': <name>, 'type': <REG|DIR>},
        # ],
        # 'next': <next_token_string|None>}
        files.extend(
            [
                prefix + f["name"]
                for f in data["content"]
                if str(f["type"]) == "REG"
            ]
        )
        prefixes.extend(
            [
                prefix + f["name"]
                for f in data["content"]
                if str(f["type"]) == "DIR"
            ]
        )
        next_token = data["next"]
        if next_token:
            continue
        if not len(prefixes):
            break
        prefix = f"{prefixes.pop()}/"
    pprint(files) # ['sub/image_1.jpg', 'image_2.jpg']

2.3 - High-level API

Overview

This layer provides high-level APIs, allowing easier access to server operations. API includes Repositories and Entities. Repositories provide management operations for Entities. Entities represent objects on the server (e.g. projects, tasks, jobs etc) and simplify interaction with them. The key difference from the low-level API is that operations on this layer are not limited by a single server request per operation and encapsulate low-level request machinery behind a high-level object-oriented API.

The code of this component is located in the cvat_sdk.core package.

Example

from cvat_sdk import make_client, models
from cvat_sdk.core.proxies.tasks import ResourceType, Task

# Create a Client instance bound to a local server and authenticate using basic auth
with make_client(host="localhost", credentials=('user', 'password')) as client:
    # Let's create a new task.

    # Fill in task parameters first.
    # Models are used the same way as in the layer 1.
    task_spec = {
        "name": "example task",
        "labels": [
            {
                "name": "car",
                "color": "#ff00ff",
                "attributes": [
                    {
                        "name": "a",
                        "mutable": True,
                        "input_type": "number",
                        "default_value": "5",
                        "values": ["4", "5", "6"],
                    }
                ],
            }
        ],
    }

    # Now we can create a task using a task repository method.
    # Repositories can be accessed as the Client class members.
    # In this case we use 2 local images as the task data.
    task = client.tasks.create_from_data(
        spec=task_spec,
        resource_type=ResourceType.LOCAL,
        resources=['image1.jpg', 'image2.png'],
    )

    # The returned task object is already up-to-date with its server counterpart.
    # Now we can access task fields. The fields are read-only and can be optional.
    # Let's check that we have 2 images in the task data.
    assert task.size == 2

    # If an object is modified on the server, the local object is not updated automatically.
    # To reflect the latest changes, the local object needs to be fetch()-ed.
    task.fetch()

    # Let's obtain another task. Again, it can be done via the task repository.
    # Suppose we have already created the task earlier and know the task id.
    task2 = client.tasks.retrieve(42)

    # The task object fields can be update()-d. Note that the set of fields that can be
    # modified can be different from what is available for reading.
    task2.update({'name': 'my task'})

    # And the task can also be remove()-d from the server. The local copy will remain
    # untouched.
    task2.remove()

Client

The cvat_sdk.core.client.Client class provides session management, implements authentication operations and simplifies access to server APIs. It is the starting point for using CVAT SDK.

A Client instance allows you to:

  • configure connection options with the Config class
  • check server API compatibility with the current SDK version
  • deduce server connection scheme (https or http) automatically
  • manage user session with the login(), logout() and other methods
  • obtain Repository objects with the users, tasks, jobs and other members
  • reach to lower-level APIs with the corresponding members

An instance of Client can be created directly by calling the class constructor or with the utility function cvat_sdk.core.client.make_client() which can handle some configuration for you. A Client can be configured with the cvat_sdk.core.client.Config class instance. A Config object can be passed to the Client constructor and then it will be available in the Client.config field.

The Client class implements the context manager protocol. When the context is closed, the session is finished, and the user is logged out automatically. Otherwise, these actions can be done with the close() and logout() methods.

You can create and start using a Client instance this way:

from cvat_sdk import make_client

with make_client('localhost', port='8080', credentials=('user', 'password')) as client:
    ...

The make_client() function handles configuration and object creation for you. It also allows to authenticate right after the object is created.

If you need to configure Client parameters, you can do this:

from cvat_sdk import Config, Client

config = Config()
# set up some config fields ...

with Client('localhost:8080', config=config) as client:
    client.login(('user', 'password'))
    ...

You can specify server address both with and without the scheme. If the scheme is omitted, it will be deduced automatically.

The checks are performed in the following order: https (with the default port 8080), http (with the default port 80). In some cases it may lead to incorrect results - e.g. you have 2 servers running on the same host at default ports. In such cases just specify the schema manually: https://localhost.

When the server is located, its version is checked. If an unsupported version is found, an error can be raised or suppressed (controlled by config.allow_unsupported_server). If the error is suppressed, some SDK functions may not work as expected with this server. By default, a warning is raised and the error is suppressed.

Users and organizations

All Client operations rely on the server API and depend on the current user rights. This affects the set of available APIs, objects and actions. For example, a regular user can only see and modify their tasks and jobs, while an admin user can see all the tasks etc.

Operations are also affected by the current organization context, which can be set with the organization_slug property of Client instances. The organization context affects which entities are visible, and where new entities are created.

Set organization_slug to an organization’s slug (short name) to make subsequent operations work in the context of that organization:

client.organization_slug = 'myorg'

# create a task in the organization
task = client.tasks.create_from_data(...)

You can also set organization_slug to an empty string to work in the context of the user’s personal workspace. By default, it is set to None, which means that both personal and organizational entities are visible, while new entities are created in the personal workspace.

To temporarily set the organization slug, use the organization_context function:

with client.organization_context('myorg'):
    task = client.tasks.create_from_data(...)

# the slug is now reset to its previous value

Entities and Repositories

Entities represent objects on the server. They provide read access to object fields and implement additional relevant operations, including both the general Read-Update-Delete and object-specific ones. The set of available general operations depends on the object type.

Repositories provide management operations for corresponding Entities. You don’t need to create Repository objects manually. To obtain a Repository object, use the corresponding Client instance member:

client.projects
client.tasks
client.jobs
client.users
...

An Entity can be created on the server with the corresponding Repository method create():

task = client.tasks.create(<task config>)

We can retrieve server objects using the retrieve() and list() methods of the Repository:

job = client.jobs.retrieve(<job id>)
tasks = client.tasks.list()

After calling these functions, we obtain local objects representing their server counterparts.

Object fields can be updated with the update() method. Note that the set of fields that can be modified can be different from what is available for reading.

job.update({'stage': 'validation'})

The server object will be updated and the local object will reflect the latest object state after calling this operation.

Note that local objects may fall out of sync with their server counterparts for different reasons. If you need to update the local object with the latest server state, use the fetch() method:

# obtain 2 local copies of the same job
job_ref1 = client.jobs.retrieve(1)
job_ref2 = client.jobs.retrieve(1)

# update the server object with the first reference
job_ref1.update(...)
# job_ref2 is outdated now

job_ref2.fetch()
# job_ref2 is synced

Finally, if you need to remove the object from the server, you can use the remove() method. The server object will be removed, but the local copy of the object will remain untouched.

task = client.tasks.retrieve(<task id>)
task.remove()

Repositories can also provide group operations over entities. For instance, you can retrieve all available objects using the list() Repository method. The list of available Entity and Repository operations depends on the object type.

You can learn more about entity members and how model parameters are passed to functions here.

The implementation for these components is located in cvat_sdk.core.proxies.

2.4 - PyTorch adapter

Overview

This layer provides functionality that enables you to treat CVAT projects and tasks as PyTorch datasets.

The code of this layer is located in the cvat_sdk.pytorch package. To use it, you must install the cvat_sdk distribution with the pytorch extra.

Example

import torch
import torchvision.models

from cvat_sdk import make_client
from cvat_sdk.pytorch import ProjectVisionDataset, ExtractSingleLabelIndex

# create a PyTorch model
model = torchvision.models.resnet34(
    weights=torchvision.models.ResNet34_Weights.IMAGENET1K_V1)
model.eval()

# log into the CVAT server
with make_client(host="localhost", credentials=('user', 'password')) as client:
    # get the dataset comprising all tasks for the Validation subset of project 12345
    dataset = ProjectVisionDataset(client, project_id=12345,
        include_subsets=['Validation'],
        # use transforms that fit our neural network
        transform=torchvision.models.ResNet34_Weights.IMAGENET1K_V1.transforms(),
        target_transform=ExtractSingleLabelIndex())

    # print the number of images in the dataset (in other words, the number of frames
    # in the included tasks)
    print(len(dataset))

    # get a sample from the dataset
    image, target = dataset[0]

    # evaluate the network on the sample and compare the output to the target
    output = model(image)
    if torch.equal(output, target):
        print("correct prediction")
    else:
        print("incorrect prediction")

Datasets

The key components of this layer are the dataset classes, ProjectVisionDataset and TaskVisionDataset, representing data & annotations contained in a CVAT project or task, respectively. Both of them are subclasses of the torch.utils.data.Dataset abstract class.

The interface of Dataset is essentially that of a sequence whose elements are samples from the dataset. In the case of TaskVisionDataset, each sample represents a frame from the task and its associated annotations. The order of the samples is the same as the order of frames in the task. Deleted frames are omitted.

In the case of ProjectVisionDataset, each sample is a sample from one of the project’s tasks, as if obtained from a TaskVisionDataset instance created for that task. The full sequence of samples is built by concatenating the sequences of samples from all included tasks in an unspecified order that is guaranteed to be consistent between executions. For details on what tasks are included, see Task filtering.

Construction

Both dataset classes are instantiated by passing in an instance of cvat_sdk.Client and the ID of the project or task:

dataset = ProjectVisionDataset(client, 123)
dataset = TaskVisionDataset(client, 456)

The referenced project or task must contain image data. Video data is currently not supported.

The constructors of these classes also support several keyword-only parameters:

During construction, the dataset objects either populate or validate the local data cache (see Caching for details). Any necessary requests to the CVAT server are performed at this time. After construction, the objects make no more network requests.

Sample format

Indexing a dataset produces a sample. A sample has the form of a tuple with the following components:

  • sample[0] (PIL.Image.Image): the image.
  • sample[1] (cvat_sdk.pytorch.Target): the annotations and auxiliary data.

The target object contains the following attributes:

  • target.annotations.tags (list[cvat_sdk.models.LabeledImage]): tag annotations associated with the current frame.
  • target.annotations.shapes (list[cvat_sdk.models.LabeledShape]): shape annotations associated with the current frame.
  • target.label_id_to_index (Mapping[int, int]): see Label index assignment.

Note that track annotations are currently inaccessible.

Transform support

The dataset classes support torchvision-like transforms that you can supply to preprocess each sample before it’s returned. You can use this to convert the samples to a more convenient format or to preprocess the data. The transforms are supplied via the following constructor parameters:

  • transforms: a callable that accepts two arguments (the image and the target) and returns a tuple with two elements.
  • transform: a callable that accepts an image.
  • target_transform: a callable that accepts a target.

Let the sample value prior to any transformations be (image, target). Here is what indexing the dataset will return for various combinations of supplied transforms:

  • transforms: transforms(image, target).
  • transform: (transform(image), target).
  • target_transform: (image, target_transform(target)).
  • transform and target_transform: (transform(image), target_transform(target)).

transforms cannot be supplied at the same time as either transform or target_transform.

The cvat_sdk.pytorch module contains some target transform classes that are intended for common use cases. See Transforms.

Label index assignment

The annotation model classes (LabeledImage and LabeledShape) reference labels by their IDs on the CVAT server. This is usually not very useful for machine learning code, since those IDs are unpredictable and will be different between different projects, even if semantically the set of labels is the same.

Therefore, the dataset classes assign to each label a unique index that is intended to be a project-independent identifier. These indices are accessible via the label_id_to_index attribute on each sample’s target. This attribute maps IDs on the server to the assigned index. The mapping is the same for every sample.

By default, the dataset classes arrange all label IDs in an unspecified order that remains consistent across executions, and assign them sequential indices, starting with 0.

You can override this behavior and specify your own label indices with the label_name_to_index constructor parameter. This parameter accepts a mapping from label name to index. The mapping must contain a key for each label in the project/task. When this parameter is specified, label indices are assigned by looking up each label’s name in the provided mapping and using the result.

Task filtering

Note: this section applies only to ProjectVisionDataset.

By default, a ProjectVisionDataset includes samples from every task belonging to the project. You can change this using the following constructor parameters:

  • task_filter (Callable[[models.ITaskRead], bool]): if set, the callable will be called for every task, with an instance of ITaskRead corresponding to that task passed as the argument. Only tasks for which True is returned will be included.

  • include_subsets (Container[str]): if set, only tasks whose subset is a member of the container will be included.

Both parameters can be set, in which case tasks must fulfill both criteria to be included.

Caching

The images and annotations of a dataset can be substantial in size, so they are not downloaded from the server every time a dataset object is created. Instead, they are loaded from a cache on the local file system, which is maintained during dataset object construction according to the policy set by the update_policy constructor parameter.

The available policies are:

  • UpdatePolicy.IF_MISSING_OR_STALE: If some data is already cached, query the server to determine if it is out of date. If so, discard it. Then, download all necessary data that is missing from the cache and cache it.

    This is the default policy.

  • UpdatePolicy.NEVER: If some necessary data is missing from the cache, raise an exception. Don’t make any network requests.

    Note that this policy permits the use of stale data.

By default, the cache is located in a platform-specific per-user directory. You can change this location with the cache_dir setting in the Client configuration.

Transforms

The layer provides some classes whose instances are callables suitable for usage with the target_transform dataset constructor parameter that are intended to simplify working with CVAT datasets in common scenarios.

ExtractBoundingBoxes

Intended for object detection tasks.

Constructor parameters:

  • include_shape_types (Iterable[str]). The values must be from the following list:

    • "ellipse"
    • "points"
    • "polygon"
    • "polyline"
    • "rectangle"

Effect: Gathers all shape annotations from the input target object whose types are contained in the value of include_shape_types. Then returns a dictionary with the following string keys (where N is the number of gathered shapes):

  • "boxes" (a floating-point tensor of shape Nx4). Each row represents the bounding box the corresponding shape in the following format: [x_min, y_min, x_max, y_max].

  • "labels" (an integer tensor of shape N). Each element is the index of the label of the corresponding shape.

Example:

ExtractBoundingBoxes(include_shape_types=['rectangle', 'ellipse'])

ExtractSingleLabelIndex

Intended for image classification tasks.

Constructor parameters: None.

Effect: If the input target object contains no tag annotations or more than one tag annotation, raises ValueError. Otherwise, returns the index of the label in the solitary tag annotation as a zero-dimensional tensor.

Example:

ExtractSingleLabelIndex()

2.5 - Auto-annotation API

Overview

This layer provides functionality that allows you to automatically annotate a CVAT dataset by running a custom function on your local machine. A function, in this context, is a Python object that implements a particular protocol defined by this layer. To avoid confusion with Python functions, auto-annotation functions will be referred to as “AA functions” in the following text. A typical AA function will be based on a machine learning model and consist of the following basic elements:

  • Code to load the ML model.

  • A specification describing the annotations that the AA function can produce.

  • Code to convert data from CVAT to a format the ML model can understand.

  • Code to run the ML model.

  • Code to convert resulting annotations to a format CVAT can understand.

The layer can be divided into several parts:

  • The interface, containing the protocol that an AA function must implement.

  • The driver, containing functionality to annotate a CVAT dataset using an AA function.

  • The predefined AA function based on Ultralytics YOLOv8n.

The auto-annotate CLI command provides a way to use an AA function from the command line rather than from a Python program. See the CLI documentation for details.

Example

from typing import List
import PIL.Image

import torchvision.models

from cvat_sdk import make_client
import cvat_sdk.models as models
import cvat_sdk.auto_annotation as cvataa

class TorchvisionDetectionFunction:
    def __init__(self, model_name: str, weights_name: str, **kwargs) -> None:
        # load the ML model
        weights_enum = torchvision.models.get_model_weights(model_name)
        self._weights = weights_enum[weights_name]
        self._transforms = self._weights.transforms()
        self._model = torchvision.models.get_model(model_name, weights=self._weights, **kwargs)
        self._model.eval()

    @property
    def spec(self) -> cvataa.DetectionFunctionSpec:
        # describe the annotations
        return cvataa.DetectionFunctionSpec(
            labels=[
                cvataa.label_spec(cat, i)
                for i, cat in enumerate(self._weights.meta['categories'])
            ]
        )

    def detect(
        self, context: cvataa.DetectionFunctionContext, image: PIL.Image.Image
    ) -> list[models.LabeledShapeRequest]:
        # determine the threshold for filtering results
        conf_threshold = context.conf_threshold or 0

        # convert the input into a form the model can understand
        transformed_image = [self._transforms(image)]

        # run the ML model
        results = self._model(transformed_image)

        # convert the results into a form CVAT can understand
        return [
            cvataa.rectangle(label.item(), [x.item() for x in box])
            for result in results
            for box, label, score in zip(result["boxes"], result["labels"], result["scores"])
            if score >= conf_threshold
        ]

# log into the CVAT server
with make_client(host="localhost", credentials=("user", "password")) as client:
    # annotate task 12345 using Faster R-CNN
    cvataa.annotate_task(client, 41617,
        TorchvisionDetectionFunction("fasterrcnn_resnet50_fpn_v2", "DEFAULT", box_score_thresh=0.5),
    )

Auto-annotation interface

Currently, the only type of AA function supported by this layer is the detection function. Therefore, all of the following information will pertain to detection functions.

A detection function accepts an image and returns a list of shapes found in that image. When it is applied to a dataset, the AA function is run for every image, and the resulting lists of shapes are combined and uploaded to CVAT.

A detection function must have two attributes, spec and detect.

spec must contain the AA function’s specification, which is an instance of DetectionFunctionSpec.

DetectionFunctionSpec must be initialized with a sequence of PatchedLabelRequest objects that represent the labels that the AA function knows about. See the docstring of DetectionFunctionSpec for more information on the constraints that these objects must follow.

detect must be a function/method accepting two parameters:

  • context (DetectionFunctionContext). Contains invocation parameters and information about the current image. The following fields are available:

    • frame_name (str). The file name of the frame on the CVAT server.
    • conf_threshold (float | None). The confidence threshold that the function should use to filter objects. If None, the function may apply a default threshold at its discretion.
  • image (PIL.Image.Image). Contains image data.

detect must return a list of LabeledShapeRequest objects, representing shapes found in the image. See the docstring of DetectionFunctionSpec for more information on the constraints that these objects must follow.

The same AA function may be used with any dataset that contain labels with the same name as the AA function’s specification. The way it works is that the driver matches labels between the spec and the dataset, and replaces the label IDs in the shape objects with those defined in the dataset.

For example, suppose the AA function’s spec defines the following labels:

Name ID
bat 0
rat 1

And the dataset defines the following labels:

Name ID
bat 100
cat 101
rat 102

Then suppose detect returns a shape with label_id equal to 1. The driver will see that it refers to the rat label, and replace it with 102, since that’s the ID this label has in the dataset.

The same logic is used for sub-label IDs.

Helper factory functions

The CVAT API model types used in the AA function protocol are somewhat unwieldy to work with, so it’s recommended to use the helper factory functions provided by this layer. These helpers instantiate an object of their corresponding model type, passing their arguments to the model constructor and sometimes setting some attributes to fixed values.

The following helpers are available for building specifications:

Name Model type Fixed attributes
label_spec PatchedLabelRequest -
skeleton_label_spec PatchedLabelRequest type="skeleton"
keypoint_spec SublabelRequest -

The following helpers are available for use in detect:

Name Model type Fixed attributes
shape LabeledShapeRequest frame=0
mask LabeledShapeRequest frame=0, type="mask"
polygon LabeledShapeRequest frame=0, type="polygon"
rectangle LabeledShapeRequest frame=0, type="rectangle"
skeleton LabeledShapeRequest frame=0, type="skeleton"
keypoint SubLabeledShapeRequest frame=0, type="points"

For mask, it is recommended to create the points list using the cvat.masks.encode_mask function, which will convert a bitmap into a list in the format that CVAT expects. For example:

cvataa.mask(my_label, encode_mask(
    my_mask,  # boolean 2D array, same size as the input image
    [x1, y1, x2, y2],  # top left and bottom right coordinates of the mask
))

Auto-annotation driver

The annotate_task function uses an AA function to annotate a CVAT task. It must be called as follows:

annotate_task(<client>, <task ID>, <AA function>, <optional arguments...>)

The supplied client will be used to make all API calls.

By default, new annotations will be appended to the old ones. Use clear_existing=True to remove old annotations instead.

If a detection function declares a label that has no matching label in the task, then by default, BadFunctionError is raised, and auto-annotation is aborted. If you use allow_unmatched_label=True, then such labels will be ignored, and any shapes referring to them will be dropped. Same logic applies to sub-label IDs.

It’s possible to pass a custom confidence threshold to the function via the conf_threshold parameter.

annotate_task will raise a BadFunctionError exception if it detects that the function violated the AA function protocol.

Predefined AA functions

This layer includes several predefined AA functions. You can use them as-is, or as a base on which to build your own.

Each function is implemented as a module to allow usage via the CLI auto-annotate command. Therefore, in order to use it from the SDK, you’ll need to import the corresponding module.

cvat_sdk.auto_annotation.functions.torchvision_detection

This AA function uses object detection models from the torchvision library. It produces rectangle annotations.

To use it, install CVAT SDK with the pytorch extra:

$ pip install "cvat-sdk[pytorch]"

Usage from Python:

from cvat_sdk.auto_annotation.functions.torchvision_detection import create as create_torchvision
annotate_task(<client>, <task ID>, create_torchvision(<model name>, ...))

Usage from the CLI:

cvat-cli auto-annotate "<task ID>" --function-module cvat_sdk.auto_annotation.functions.torchvision_detection \
      -p model_name=str:"<model name>" ...

The create function accepts the following parameters:

  • model_name (str) - the name of the model, such as fasterrcnn_resnet50_fpn_v2. This parameter is required.
  • weights_name (str) - the name of a weights enum value for the model, such as COCO_V1. Defaults to DEFAULT.

It also accepts arbitrary additional parameters, which are passed directly to the model constructor.

cvat_sdk.auto_annotation.functions.torchvision_instance_segmentation

This AA function is analogous to torchvision_detection, except it uses torchvision’s instance segmentation models and produces mask or polygon annotations (depending on the value of conv_mask_to_poly).

Refer to that function’s description for usage instructions and parameter information.

cvat_sdk.auto_annotation.functions.torchvision_keypoint_detection

This AA function is analogous to torchvision_detection, except it uses torchvision’s keypoint detection models and produces skeleton annotations. Keypoints which the model marks as invisible will be marked as occluded in CVAT.

Refer to that function’s description for usage instructions and parameter information.

2.6 - Developer guide

Overview

This package contains manually written and autogenerated files. We store only sources in the repository. To get the full package, one need to generate missing package files.

Layout of the cvat-sdk directory

  • gen/ - generator files
  • cvat_sdk/ - Python package root
  • cvat_sdk/api_client - autogenerated low-level package code
  • cvat_sdk/core - high-level package code

How to generate package code

  1. Install generator dependencies:

    pip install -r cvat-sdk/gen/requirements.txt
    
  2. Generate package code (call from the package root directory!):

    ./cvat-sdk/gen/generate.sh
    
  3. Install the packages:

    pip install ./cvat-sdk
    pip install ./cvat-cli
    

    If you want to edit package files, install them with -e:

    pip install -e ./cvat-sdk
    pip install -e ./cvat-cli
    

How to edit templates

If you want to edit templates, obtain them from the generator first:

docker run --rm -v $PWD:/local \
    openapitools/openapi-generator-cli author template \
        -o /local/generator_templates -g python

Then, you can copy the modified version of the template you need into the gen/templates/openapi-generator/ directory.

Relevant links:

How to test

API client tests are integrated into REST API tests in /tests/python/rest_api and SDK tests are placed next to them in /tests/python/sdk. To execute, run:

pytest tests/python/rest_api tests/python/sdk

SDK API design decisions

The generated ApiClient code is modified from what openapi-generator does by default. Changes are mostly focused on better user experience - including better usage patterns and simpler/faster ways to achieve results.

Modifications

  • Added Python type annotations for return types and class members. This change required us to implement a custom post-processing script, which converts generated types into correct type annotations. The types generated by default are supposed to work with the API implementation (parameter validation and parsing), but they are not applicable as type annotations (they have incorrect syntax). Custom post-processing allowed us to make these types correct type annotations. Other possible solutions:

    • There is the python-experimental API generator, which may solve some issues, but it is unstable and requires python 3.9. Our API works with 3.7, which is the lowest supported version now.
    • Custom templates - partially works, but only in limited cases (model fields). It’s very hard to maintain the template code and logic for this. Only if checks and for loops are available in mustache templates, which is not enough for annotation generation.
  • Separate APIs are embedded into the general APIClient class. Now we have:

    with ApiClient(config) as api_client:
      result1 = api_client.foo_api.operation1()
      result2 = api_client.bar_api.operation2()
    

    This showed to be more convenient than the default:

    with ApiClient(config) as api_client:
      foo_api = FooApi(api_client)
      result1 = foo_api.operation1()
      result2 = foo_api.operation2()
    
      bar_api = BarApi(api_client)
      result3 = bar_api.operation3()
      result4 = bar_api.operation4()
    

    This also required custom post-processing. Operation Ids are supposed to be unique in the OpenAPI / Swagger specification. Therefore, we can’t generate such schema on the server, nor we can’t expect it to be supported in the API generator.

  • Operations have IDs like <api>/<method>_<object>. This also showed to be more readable and more natural than DRF-spectacular’s default <api>/<object>_<method>.

  • Server operations have different types for input and output values. While it can be expected that an endpoint with POST/PUT methods available (like create or partial_update) has the same type for input and output (because it looks natural), it also leads to the situation, in which there are lots of read-/write-only fields, and it becomes hard for understanding. This clear type separation is supposed to make it simpler for users.

  • Added cookie management in the ApiClient class.

  • Added interface classes for models to simplify class member usage and lookup.

  • Dicts can be passed into API methods and model constructors instead of models. They are automatically parsed as models. In the original implementation, the user is required to pass a Configuration object each time, which is clumsy and adds little sense.

3 - Command line interface (CLI)

Overview

A simple command line interface for working with CVAT. At the moment it implements a basic feature set but may serve as the starting point for a more comprehensive CVAT administration tool in the future.

The following subcommands are supported:

  • Projects:

    • create - create a new project
    • delete - delete projects
    • ls - list all projects
  • Tasks:

    • create - create a new task
    • create-from-backup - create a task from a backup file
    • delete - delete tasks
    • ls - list all tasks
    • frames - download frames from a task
    • export-dataset - export a task as a dataset
    • import-dataset - import annotations into a task from a dataset
    • backup - back up a task
    • auto-annotate - automatically annotate a task using a local function

Installation

To install an official release of CVAT CLI, use this command:

pip install cvat-cli

We support Python versions 3.9 and higher.

Usage

The general form of a CLI command is:

$ cvat-cli <common options> <resource> <action> <options>

where:

  • <common options> are options shared between all subcommands;
  • <resource> is a CVAT resource, such as task;
  • <action> is the action to do with the resource, such as create;
  • <options> is any options specific to a particular resource and action.

You can list available subcommands and options using the --help option:

$ cvat-cli --help # get help on available common options and resources
$ cvat-cli <resource> --help # get help on actions for the given resource
$ cvat-cli <resource> <action> --help # get help on action-specific options

The CLI implements alias subcommands for some task actions, so that, for example, cvat-cli ls works the same way as cvat-cli task ls. These aliases are provided for backwards compatibility and are deprecated. Use the task <action> form instead.

Examples - tasks

Create

Description of the options you can find in Creating an annotation task section.

For create a task you need file contain labels in the json format, you can create a JSON label specification by using the label constructor.

Example JSON labels file
[
    {
        "name": "cat",
        "attributes": []
    },
    {
        "name": "dog",
        "attributes": []
    }
]

  • Create a task named “new task” on the default server “localhost:8080”, labels from the file “labels.json” and local images “file1.jpg” and “file2.jpg”, the task will be created as current user:
    cvat-cli task create "new task" --labels labels.json local file1.jpg file2.jpg
    
  • Create a task named “task 1” on the server “example.com” labels from the file “labels.json” and local image “image1.jpg”, the task will be created as user “user-1”:
    cvat-cli --server-host example.com --auth user-1 task create "task 1" \
    --labels labels.json local image1.jpg
    
  • Create a task named “task 1” on the default server, with labels from “labels.json” and local image “file1.jpg”, as the current user, in organization “myorg”:
    cvat-cli --org myorg task create "task 1" --labels labels.json local file1.jpg
    
  • Create a task named “task 1”, labels from the project with id 1 and with a remote video file, the task will be created as user “user-1”:
    cvat-cli --auth user-1:password task create "task 1" --project_id 1 \
    remote https://github.com/opencv/opencv/blob/master/samples/data/vtest.avi?raw=true
    
  • Create a task named “task 1 sort random”, with labels “cat” and “dog”, with chunk size 8, with sorting-method random, frame step 10, copy the data on the CVAT server, with use zip chunks and the video file will be taken from the shared resource:
    cvat-cli task create "task 1 sort random" --labels '[{"name": "cat"},{"name": "dog"}]' --chunk_size 8 \
    --sorting-method random --frame_step 10 --copy_data --use_zip_chunks share //share/dataset_1/video.avi
    
  • Create a task named “task from dataset_1”, labels from the file “labels.json”, with link to bug tracker, image quality will be reduced to 75, annotation in the format “CVAT 1.1” will be taken from the file “annotation.xml”, the data will be loaded from “dataset_1/images/”, the task will be created as user “user-2”, and the password will need to be entered additionally:
    cvat-cli --auth user-2 task create "task from dataset_1" --labels labels.json \
    --bug_tracker https://bug-tracker.com/0001 --image_quality 75 --annotation_path annotation.xml \
    --annotation_format "CVAT 1.1" local dataset_1/images/
    
  • Create a task named “segmented task 1”, labels from the file “labels.json”, with overlay size 5, segment size 100, with frames 5 through 705, using cache and with a remote video file:
    cvat-cli task create "segmented task 1" --labels labels.json --overlap 5 --segment_size 100 \
    --start_frame 5 --stop_frame 705 --use_cache \
    remote https://github.com/opencv/opencv/blob/master/samples/data/vtest.avi?raw=true
    
  • Create a task named “task with filtered cloud storage data”, with filename_pattern test_images/*.jpeg and using the data from the cloud storage resource described in the manifest.jsonl:
    cvat-cli task create "task with filtered cloud storage data" --labels '[{"name": "car"}]'\
    --use_cache --cloud_storage_id 1 --filename_pattern "test_images/*.jpeg" share manifest.jsonl
    
  • Create a task named “task with filtered cloud storage data” using all data from the cloud storage resource described in the manifest.jsonl by specifying filename_pattern *:
    cvat-cli task create "task with filtered cloud storage data" --labels '[{"name": "car"}]'\
    --use_cache --cloud_storage_id 1 --filename_pattern "*" share manifest.jsonl
    

Delete

  • Delete tasks with IDs “100”, “101”, “102” , the command will be executed from “user-1” having delete permissions:
    cvat-cli --auth user-1:password task delete 100 101 102
    

List

  • List all tasks:
    cvat-cli task ls
    
  • List all tasks in organization “myorg”:
    cvat-cli --org myorg task ls
    
  • Save list of all tasks into file “list_of_tasks.json”:
    cvat-cli task ls --json > list_of_tasks.json
    

Frames

  • Save frame 12, 15, 22 from task with id 119, into “images” folder with compressed quality:
    cvat-cli task frames --outdir images --quality compressed 119 12 15 22
    

Export as a dataset

  • Export annotation task with id 103, in the format CVAT for images 1.1 and save to the file “output.zip”:
    cvat-cli task export-dataset --format "CVAT for images 1.1" 103 output.zip
    
  • Export annotation task with id 104, in the format COCO 1.0 and save to the file “output.zip”:
    cvat-cli task export-dataset --format "COCO 1.0" 104 output.zip
    

Import annotations from a dataset

  • Import annotation into task with id 105, in the format CVAT 1.1 from the file “annotation.xml”:
    cvat-cli task import-dataset --format "CVAT 1.1" 105 annotation.xml
    

Back up a task

  • Back up task with id 136 to file “task_136.zip”:
    cvat-cli task backup 136 task_136.zip
    

Create from backup

  • Create a task from backup file “task_backup.zip”:
    cvat-cli task create-from-backup task_backup.zip
    

Auto-annotate

This command provides a command-line interface to the auto-annotation API.

It can auto-annotate using AA functions implemented in one of the following ways:

  1. As a Python module directly implementing the AA function protocol. Such a module must define the required attributes at the module level.

    For example:

    import cvat_sdk.auto_annotation as cvataa
    
    spec = cvataa.DetectionFunctionSpec(...)
    
    def detect(context, image):
        ...
    
  2. As a Python module implementing a factory function named create. This function must return an object implementing the AA function protocol. Any parameters specified on the command line using the -p option will be passed to create.

    For example:

    import cvat_sdk.auto_annotation as cvataa
    
    class _MyFunction:
        def __init__(...):
            ...
    
        spec = cvataa.DetectionFunctionSpec(...)
    
        def detect(context, image):
            ...
    
    def create(...) -> cvataa.DetectionFunction:
        return _MyFunction(...)
    
  • Annotate the task with id 137 with the predefined torchvision detection function, which is parameterized:

    cvat-cli task auto-annotate 137 --function-module cvat_sdk.auto_annotation.functions.torchvision_detection \
        -p model_name=str:fasterrcnn_resnet50_fpn_v2 -p box_score_thresh=float:0.5
    
  • Annotate the task with id 138 with an AA function defined in my_func.py:

    cvat-cli task auto-annotate 138 --function-file path/to/my_func.py
    

Note that this command does not modify the Python module search path. If your function module needs to import other local modules, you must add your module directory to the search path if it isn’t there already.

  • Annotate the task with id 139 with a function defined in the my_func module located in the my-project directory, letting it import other modules from that directory.
    PYTHONPATH=path/to/my-project cvat-cli task auto-annotate 139 --function-module my_func
    

Examples - projects

Create

While creating a project, you may optionally define its labels. The project create command accepts labels in the same format as the task create command; see that command’s examples for more information.

  • Create a project named “new project” on the default server “localhost:8080”, with labels from the file “labels.json”:
    cvat-cli project create "new project" --labels labels.json
    
  • Create a project from a dataset in the COCO format:
    cvat-cli project create "new project" --dataset_file coco.zip --dataset_format "COCO 1.0"
    

Delete

  • Delete projects with IDs “100”, “101”, “102”:
    cvat-cli project delete 100 101 102
    

List

  • List all projects:
    cvat-cli project ls
    
  • Save list of all projects into file “list_of_projects.json”:
    cvat-cli project ls --json > list_of_projects.json