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

Return to the regular view of this page.

CVAT Python SDK

Overview

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

SDK API includes several layers:

  • Low-level API with REST API wrappers. Located atcvat_sdk.api_client.Read more
  • High-level API. Located atcvat_sdk.core.Read more
  • PyTorch adapter. Located atcvat_sdk.pytorch.Read more
  • Auto-annotation API. Located atcvat_sdk.auto_annotation.Read more
  • Miscellaneous utilities, grouped by topic.Located atcvat_sdk.attributes andcvat_sdk.masks.

In general, the low-level API provides single-request operations, while the high-level oneimplements 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 bethe right point to start your integration with CVAT.

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

The auto-annotation API is a specialized layerthat lets you automatically annotate CVAT datasetsby running a custom function on the local machine.See also theauto-annotate command in the CLI.

Installation

To install anofficial release of CVAT SDK use this command:

pip install cvat-sdk

To use thecvat_sdk.masks module, request themasks extra:

pip install"cvat-sdk[masks]"

To use the PyTorch adapter or the built-in PyTorch-based auto-annotation functions,request thepytorch 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:

importcvat_sdk# orimportcvat_sdk.core

For the low-level API:

importcvat_sdk.api_client

For the PyTorch adapter:

importcvat_sdk.pytorch

1 - SDK API Reference

1.1 - APIs

All URIs are relative tohttp://localhost

ClassMethodHTTP requestDescription
AssetsApicreatePOST /api/assetsCreate an asset
AssetsApidestroyDELETE /api/assets/{uuid}Delete an asset
AssetsApiretrieveGET /api/assets/{uuid}Get an asset
AuthApicreate_loginPOST /api/auth/login
AuthApicreate_logoutPOST /api/auth/logout
AuthApicreate_password_changePOST /api/auth/password/change
AuthApicreate_password_resetPOST /api/auth/password/reset
AuthApicreate_password_reset_confirmPOST /api/auth/password/reset/confirm
AuthApicreate_registerPOST /api/auth/register
AuthApicreate_signingPOST /api/auth/signingThis method signs URL for access to the server
AuthApiretrieve_rulesGET /api/auth/rules
CloudstoragesApicreatePOST /api/cloudstoragesCreate a cloud storage
CloudstoragesApidestroyDELETE /api/cloudstorages/{id}Delete a cloud storage
CloudstoragesApilistGET /api/cloudstoragesList cloud storages
CloudstoragesApipartial_updatePATCH /api/cloudstorages/{id}Update a cloud storage
CloudstoragesApiretrieveGET /api/cloudstorages/{id}Get cloud storage details
CloudstoragesApiretrieve_actionsGET /api/cloudstorages/{id}/actionsGet allowed actions for a cloud storage
CloudstoragesApiretrieve_content_v2GET /api/cloudstorages/{id}/content-v2Get cloud storage content
CloudstoragesApiretrieve_previewGET /api/cloudstorages/{id}/previewGet a preview image for a cloud storage
CloudstoragesApiretrieve_statusGET /api/cloudstorages/{id}/statusGet the status of a cloud storage
CommentsApicreatePOST /api/commentsCreate a comment
CommentsApidestroyDELETE /api/comments/{id}Delete a comment
CommentsApilistGET /api/commentsList comments
CommentsApipartial_updatePATCH /api/comments/{id}Update a comment
CommentsApiretrieveGET /api/comments/{id}Get comment details
ConsensusApicreate_mergePOST /api/consensus/mergesCreate a consensus merge
ConsensusApilist_settingsGET /api/consensus/settingsList consensus settings instances
ConsensusApipartial_update_settingsPATCH /api/consensus/settings/{id}Update a consensus settings instance
ConsensusApiretrieve_settingsGET /api/consensus/settings/{id}Get consensus settings instance details
EventsApicreatePOST /api/eventsLog client events
EventsApicreate_exportPOST /api/events/exportInitiate a process to export events
EventsApilistGET /api/eventsGet an event log
GuidesApicreatePOST /api/guidesCreate an annotation guide
GuidesApidestroyDELETE /api/guides/{id}Delete an annotation guide
GuidesApipartial_updatePATCH /api/guides/{id}Update an annotation guide
GuidesApiretrieveGET /api/guides/{id}Get annotation guide details
InvitationsApiacceptPOST /api/invitations/{key}/acceptAccept an invitation
InvitationsApicreatePOST /api/invitationsCreate an invitation
InvitationsApideclinePOST /api/invitations/{key}/declineDecline an invitation
InvitationsApidestroyDELETE /api/invitations/{key}Delete an invitation
InvitationsApilistGET /api/invitationsList invitations
InvitationsApipartial_updatePATCH /api/invitations/{key}Update an invitation
InvitationsApiresendPOST /api/invitations/{key}/resendResend an invitation
InvitationsApiretrieveGET /api/invitations/{key}Get invitation details
IssuesApicreatePOST /api/issuesCreate an issue
IssuesApidestroyDELETE /api/issues/{id}Delete an issue
IssuesApilistGET /api/issuesList issues
IssuesApipartial_updatePATCH /api/issues/{id}Update an issue
IssuesApiretrieveGET /api/issues/{id}Get issue details
JobsApicreatePOST /api/jobsCreate a job
JobsApicreate_annotationsPOST /api/jobs/{id}/annotations/Import annotations into a job
JobsApicreate_dataset_exportPOST /api/jobs/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
JobsApidestroyDELETE /api/jobs/{id}Delete a job
JobsApidestroy_annotationsDELETE /api/jobs/{id}/annotations/Delete job annotations
JobsApilistGET /api/jobsList jobs
JobsApipartial_updatePATCH /api/jobs/{id}Update a job
JobsApipartial_update_annotationsPATCH /api/jobs/{id}/annotations/Update job annotations
JobsApipartial_update_data_metaPATCH /api/jobs/{id}/data/metaUpdate metainformation for media files in a job
JobsApipartial_update_validation_layoutPATCH /api/jobs/{id}/validation_layoutAllows updating current validation configuration
JobsApiretrieveGET /api/jobs/{id}Get job details
JobsApiretrieve_annotationsGET /api/jobs/{id}/annotations/Get job annotations
JobsApiretrieve_dataGET /api/jobs/{id}/dataGet data of a job
JobsApiretrieve_data_metaGET /api/jobs/{id}/data/metaGet metainformation for media files in a job
JobsApiretrieve_previewGET /api/jobs/{id}/previewGet a preview image for a job
JobsApiretrieve_validation_layoutGET /api/jobs/{id}/validation_layoutAllows getting current validation configuration
JobsApiupdate_annotationsPUT /api/jobs/{id}/annotations/Replace job annotations
LabelsApidestroyDELETE /api/labels/{id}Delete a label
LabelsApilistGET /api/labelsList labels
LabelsApipartial_updatePATCH /api/labels/{id}Update a label
LabelsApiretrieveGET /api/labels/{id}Get label details
LambdaApicreate_functionsPOST /api/lambda/functions/{func_id}
LambdaApicreate_requestsPOST /api/lambda/requestsMethod calls the function
LambdaApidelete_requestsDELETE /api/lambda/requests/{id}Method cancels the request
LambdaApilist_functionsGET /api/lambda/functionsMethod returns a list of functions
LambdaApilist_requestsGET /api/lambda/requestsMethod returns a list of requests
LambdaApiretrieve_functionsGET /api/lambda/functions/{func_id}Method returns the information about the function
LambdaApiretrieve_requestsGET /api/lambda/requests/{id}Method returns the status of the request
MembershipsApidestroyDELETE /api/memberships/{id}Delete a membership
MembershipsApilistGET /api/membershipsList memberships
MembershipsApipartial_updatePATCH /api/memberships/{id}Update a membership
MembershipsApiretrieveGET /api/memberships/{id}Get membership details
OrganizationsApicreatePOST /api/organizationsCreate an organization
OrganizationsApidestroyDELETE /api/organizations/{id}Delete an organization
OrganizationsApilistGET /api/organizationsList organizations
OrganizationsApipartial_updatePATCH /api/organizations/{id}Update an organization
OrganizationsApiretrieveGET /api/organizations/{id}Get organization details
ProjectsApicreatePOST /api/projectsCreate a project
ProjectsApicreate_backupPOST /api/projects/backup/Recreate a project from a backup
ProjectsApicreate_backup_exportPOST /api/projects/{id}/backup/exportInitiate process to backup resource
ProjectsApicreate_datasetPOST /api/projects/{id}/dataset/Import a dataset into a project
ProjectsApicreate_dataset_exportPOST /api/projects/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
ProjectsApidestroyDELETE /api/projects/{id}Delete a project
ProjectsApilistGET /api/projectsList projects
ProjectsApipartial_updatePATCH /api/projects/{id}Update a project
ProjectsApiretrieveGET /api/projects/{id}Get project details
ProjectsApiretrieve_previewGET /api/projects/{id}/previewGet a preview image for a project
QualityApicreate_reportPOST /api/quality/reportsCreate a quality report
QualityApilist_conflictsGET /api/quality/conflictsList annotation conflicts in a quality report
QualityApilist_reportsGET /api/quality/reportsMethod returns a paginated list of quality reports.
QualityApilist_settingsGET /api/quality/settingsList quality settings instances
QualityApipartial_update_settingsPATCH /api/quality/settings/{id}Update a quality settings instance
QualityApiretrieve_reportGET /api/quality/reports/{id}Get quality report details
QualityApiretrieve_report_dataGET /api/quality/reports/{id}/dataGet quality report contents
QualityApiretrieve_settingsGET /api/quality/settings/{id}Get quality settings instance details
RequestsApicreate_cancelPOST /api/requests/{id}/cancelCancel request
RequestsApilistGET /api/requestsList requests
RequestsApiretrieveGET /api/requests/{id}Get request details
SchemaApiretrieveGET /api/schema/
ServerApilist_shareGET /api/server/shareList files/directories in the mounted share
ServerApiretrieve_aboutGET /api/server/aboutGet basic CVAT information
ServerApiretrieve_annotation_formatsGET /api/server/annotation/formatsGet supported annotation formats
ServerApiretrieve_pluginsGET /api/server/pluginsGet enabled plugins
TasksApicreatePOST /api/tasksCreate a task
TasksApicreate_annotationsPOST /api/tasks/{id}/annotations/Import annotations into a task
TasksApicreate_backupPOST /api/tasks/backup/Recreate a task from a backup
TasksApicreate_backup_exportPOST /api/tasks/{id}/backup/exportInitiate process to backup resource
TasksApicreate_dataPOST /api/tasks/{id}/data/Attach data to a task
TasksApicreate_dataset_exportPOST /api/tasks/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
TasksApidestroyDELETE /api/tasks/{id}Delete a task
TasksApidestroy_annotationsDELETE /api/tasks/{id}/annotations/Delete task annotations
TasksApilistGET /api/tasksList tasks
TasksApipartial_updatePATCH /api/tasks/{id}Update a task
TasksApipartial_update_annotationsPATCH /api/tasks/{id}/annotations/Update task annotations
TasksApipartial_update_data_metaPATCH /api/tasks/{id}/data/metaUpdate metainformation for media files in a task
TasksApipartial_update_validation_layoutPATCH /api/tasks/{id}/validation_layoutAllows updating current validation configuration
TasksApiretrieveGET /api/tasks/{id}Get task details
TasksApiretrieve_annotationsGET /api/tasks/{id}/annotations/Get task annotations
TasksApiretrieve_dataGET /api/tasks/{id}/data/Get data of a task
TasksApiretrieve_data_metaGET /api/tasks/{id}/data/metaGet metainformation for media files in a task
TasksApiretrieve_previewGET /api/tasks/{id}/previewGet a preview image for a task
TasksApiretrieve_statusGET /api/tasks/{id}/statusGet the creation status of a task
TasksApiretrieve_validation_layoutGET /api/tasks/{id}/validation_layoutAllows getting current validation configuration
TasksApiupdate_annotationsPUT /api/tasks/{id}/annotations/Replace task annotations
UsersApidestroyDELETE /api/users/{id}Delete a user
UsersApilistGET /api/usersList users
UsersApipartial_updatePATCH /api/users/{id}Update a user
UsersApiretrieveGET /api/users/{id}Get user details
UsersApiretrieve_selfGET /api/users/selfGet details of the current user
WebhooksApicreatePOST /api/webhooksCreate a webhook
WebhooksApicreate_deliveries_redeliveryPOST /api/webhooks/{id}/deliveries/{delivery_id}/redeliveryRedeliver a webhook delivery
WebhooksApicreate_pingPOST /api/webhooks/{id}/pingSend a ping webhook
WebhooksApidestroyDELETE /api/webhooks/{id}Delete a webhook
WebhooksApilistGET /api/webhooksList webhooks
WebhooksApilist_deliveriesGET /api/webhooks/{id}/deliveriesList deliveries for a webhook
WebhooksApipartial_updatePATCH /api/webhooks/{id}Update a webhook
WebhooksApiretrieveGET /api/webhooks/{id}Get webhook details
WebhooksApiretrieve_deliveriesGET /api/webhooks/{id}/deliveries/{delivery_id}Get details of a webhook delivery
WebhooksApiretrieve_eventsGET /api/webhooks/eventsList available webhook events
WebhooksApiupdatePUT /api/webhooks/{id}Replace a webhook

1.1.1 - AssetsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/assetsCreate an asset
destroyDELETE /api/assets/{uuid}Delete an asset
retrieveGET /api/assets/{uuid}Get an asset

create

create(guide_id,file,**kwargs)

Create an asset

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:guide_id=1# int |file=open('/path/to/file','rb')# file_type |try:(data,response)=api_client.assets_api.create(guide_id,file,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AssetsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
guide_idint
filefile_type

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(uuid,**kwargs)

Delete an asset

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:uuid="uuid_example"# str | A UUID string identifying this asset.try:api_client.assets_api.destroy(uuid,)exceptexceptions.ApiExceptionase:print("Exception when calling AssetsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
uuidstrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The asset has been deleted-

retrieve

retrieve(uuid,**kwargs)

Get an asset

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:uuid="uuid_example"# str | A UUID string identifying this asset.try:api_client.assets_api.retrieve(uuid,)exceptexceptions.ApiExceptionase:print("Exception when calling AssetsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
uuidstrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Asset file-

1.1.2 - AuthApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_loginPOST /api/auth/login
create_logoutPOST /api/auth/logout
create_password_changePOST /api/auth/password/change
create_password_resetPOST /api/auth/password/reset
create_password_reset_confirmPOST /api/auth/password/reset/confirm
create_registerPOST /api/auth/register
create_signingPOST /api/auth/signingThis method signs URL for access to the server
retrieve_rulesGET /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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_login():%s\n"%e)

Parameters

NameTypeDescriptionNotes
login_serializer_ex_requestLoginSerializerExRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.auth_api.create_logout()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_change():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_change_requestPasswordChangeRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_reset():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_reset_serializer_ex_requestPasswordResetSerializerExRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_reset_confirm():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_reset_confirm_requestPasswordResetConfirmRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

create_register

create_register(register_serializer_ex_request,**kwargs)

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_register():%s\n"%e)

Parameters

NameTypeDescriptionNotes
register_serializer_ex_requestRegisterSerializerExRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:signing_request=SigningRequest(url="url_example",)# SigningRequest |try:(data,response)=api_client.auth_api.create_signing(signing_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_signing():%s\n"%e)

Parameters

NameTypeDescriptionNotes
signing_requestSigningRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200text URL-

retrieve_rules

retrieve_rules(**kwargs)

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",)withApiClient(configuration)asapi_client:try:api_client.auth_api.retrieve_rules()exceptexceptions.ApiExceptionase: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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

No authentication required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200No response body-

1.1.3 - CloudstoragesApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/cloudstoragesCreate a cloud storage
destroyDELETE /api/cloudstorages/{id}Delete a cloud storage
listGET /api/cloudstoragesList cloud storages
partial_updatePATCH /api/cloudstorages/{id}Update a cloud storage
retrieveGET /api/cloudstorages/{id}Get cloud storage details
retrieve_actionsGET /api/cloudstorages/{id}/actionsGet allowed actions for a cloud storage
retrieve_content_v2GET /api/cloudstorages/{id}/content-v2Get cloud storage content
retrieve_previewGET /api/cloudstorages/{id}/previewGet a preview image for a cloud storage
retrieve_statusGET /api/cloudstorages/{id}/statusGet 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
cloud_storage_write_requestCloudStorageWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.try:api_client.cloudstorages_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
credentials_typestrA simple equality filter for the credentials_type field[optional]
filterstrJSON 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]
namestrA simple equality filter for the name field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
provider_typestrA simple equality filter for the provider_type field[optional]
resourcestrA simple equality filter for the resource field[optional]
searchstrA search term. Available search_fields: (‘provider_type’, ’name’, ‘resource’, ‘credentials_type’, ‘owner’, ‘description’)[optional]
sortstrWhich 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.
patched_cloud_storage_write_requestPatchedCloudStorageWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get cloud storage details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.try:(data,response)=api_client.cloudstorages_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.try:(data,response)=api_client.cloudstorages_api.retrieve_actions(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve_actions():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Cloud Storage actions (GETPUT

retrieve_content_v2

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

Get cloud storage content

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve_content_v2():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.
manifest_pathstrPath to the manifest file in a cloud storage[optional]
next_tokenstrUsed to continue listing files in the bucket[optional]
page_sizeint[optional]
prefixstrPrefix 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200A manifest content-

retrieve_preview

retrieve_preview(id,**kwargs)

Get a preview image for a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.try:api_client.cloudstorages_api.retrieve_preview(id,)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve_preview():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_status

retrieve_status(id,**kwargs)

Get the status of a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.try:(data,response)=api_client.cloudstorages_api.retrieve_status(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve_status():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Cloud Storage status (AVAILABLENOT_FOUND

1.1.4 - CommentsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/commentsCreate a comment
destroyDELETE /api/comments/{id}Delete a comment
listGET /api/commentsList comments
partial_updatePATCH /api/comments/{id}Update a comment
retrieveGET /api/comments/{id}Get comment details

create

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

Create a comment

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CommentsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
comment_write_requestCommentWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete a comment

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this comment.try:api_client.comments_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling CommentsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CommentsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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_idintA simple equality filter for the frame_id field[optional]
issue_idintA simple equality filter for the issue_id field[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (‘owner’,)[optional]
sortstrWhich 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a comment

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling CommentsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this comment.
patched_comment_write_requestPatchedCommentWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get comment details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this comment.try:(data,response)=api_client.comments_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CommentsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.5 - ConsensusApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_mergePOST /api/consensus/mergesCreate a consensus merge
list_settingsGET /api/consensus/settingsList consensus settings instances
partial_update_settingsPATCH /api/consensus/settings/{id}Update a consensus settings instance
retrieve_settingsGET /api/consensus/settings/{id}Get consensus settings instance details

create_merge

create_merge(consensus_merge_create_request=None,**kwargs)

Create a consensus merge

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:consensus_merge_create_request=ConsensusMergeCreateRequest(task_id=1,job_id=1,)# ConsensusMergeCreateRequest |  (optional)try:(data,response)=api_client.consensus_api.create_merge(consensus_merge_create_request=consensus_merge_create_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ConsensusApi.create_merge():%s\n"%e)

Parameters

NameTypeDescriptionNotes
consensus_merge_create_requestConsensusMergeCreateRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202A consensus merge request has been enqueued, the request id is returned. The request status can be checked by using common requests API: GET /api/requests/<rq_id>-
400Invalid or failed request, check the response data for details-

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 consensus settings instances

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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.consensus_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)exceptexceptions.ApiExceptionase:print("Exception when calling ConsensusApi.list_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘id’][optional]
task_idintA 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[PaginatedConsensusSettingsList, 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_settings

partial_update_settings(id,patched_consensus_settings_request=None,**kwargs)

Update a consensus settings instance

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | An id of a consensus settings instancepatched_consensus_settings_request=PatchedConsensusSettingsRequest(iou_threshold=0,quorum=0,)# PatchedConsensusSettingsRequest |  (optional)try:(data,response)=api_client.consensus_api.partial_update_settings(id,patched_consensus_settings_request=patched_consensus_settings_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ConsensusApi.partial_update_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintAn id of a consensus settings instance
patched_consensus_settings_requestPatchedConsensusSettingsRequest[optional]

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

Returned values

Returned type:Tuple[ConsensusSettings, 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_settings

retrieve_settings(id,**kwargs)

Get consensus settings instance details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | An id of a consensus settings instancetry:(data,response)=api_client.consensus_api.retrieve_settings(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ConsensusApi.retrieve_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintAn id of a consensus settings instance

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

Returned values

Returned type:Tuple[ConsensusSettings, 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.6 - EventsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/eventsLog client events
create_exportPOST /api/events/exportInitiate a process to export events
listGET /api/eventsGet 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling EventsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
client_events_requestClientEventsRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

create_export

create_export(cloud_storage_id=None,filename=None,_from=None,job_id=None,location=None,org_id=None,project_id=None,task_id=None,to=None,user_id=None,**kwargs)

Initiate a process to export events

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:cloud_storage_id=1# int | Storage id (optional)filename="filename_example"# str | Desired output file name (optional)_from=dateutil_parser('1970-01-01T00:00:00.00Z')# datetime | UTC start date for events filtration. Default is the minimal time. (optional)job_id=1# int | Filter events by job ID (optional)location="cloud_storage"# str | Where need to save events file (optional)org_id=1# int | Filter events by organization ID (optional)project_id=1# int | Filter events by project ID (optional)task_id=1# int | Filter events by task ID (optional)to=dateutil_parser('1970-01-01T00:00:00.00Z')# datetime | UTC end date for events filtration. Default is the current time. (optional)user_id=1# int | Filter events by user ID (optional)try:(data,response)=api_client.events_api.create_export(cloud_storage_id=cloud_storage_id,filename=filename,_from=_from,job_id=job_id,location=location,org_id=org_id,project_id=project_id,task_id=task_id,to=to,user_id=user_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling EventsApi.create_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
cloud_storage_idintStorage id[optional]
filenamestrDesired output file name[optional]
_fromdatetimeUTC start date for events filtration. Default is the minimal time.[optional]
job_idintFilter events by job ID[optional]
locationstrWhere need to save events file[optional]
org_idintFilter events by organization ID[optional]
project_idintFilter events by project ID[optional]
task_idintFilter events by task ID[optional]
todatetimeUTC end date for events filtration. Default is the current time.[optional]
user_idintFilter events by user ID[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202-

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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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 | UTC start date for events filtration. Default is the minimal time. (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 | UTC end date for events filtration. Default is the current time. (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,)exceptexceptions.ApiExceptionase:print("Exception when calling EventsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
actionstrUsed to start downloading process after annotation file had been created[optional] if omitted the server will use the default value of “download”
filenamestrDesired output file name[optional]
_fromdatetimeUTC start date for events filtration. Default is the minimal time.[optional]
job_idintFilter events by job ID[optional]
org_idintFilter events by organization ID[optional]
project_idintFilter events by project ID[optional]
query_idstrID of query request that need to check or download[optional]
task_idintFilter events by task ID[optional]
todatetimeUTC end date for events filtration. Default is the current time.[optional]
user_idintFilter 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

1.1.7 - GuidesApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/guidesCreate an annotation guide
destroyDELETE /api/guides/{id}Delete an annotation guide
partial_updatePATCH /api/guides/{id}Update an annotation guide
retrieveGET /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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling GuidesApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
annotation_guide_write_requestAnnotationGuideWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete an annotation guide

This also deletes all assets attached to the guide.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this annotation guide.try:api_client.guides_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling GuidesApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The annotation guide has been deleted-

partial_update

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

Update an annotation guide

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling GuidesApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this annotation guide.
patched_annotation_guide_write_requestPatchedAnnotationGuideWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get annotation guide details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this annotation guide.try:(data,response)=api_client.guides_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling GuidesApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.8 - InvitationsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
acceptPOST /api/invitations/{key}/acceptAccept an invitation
createPOST /api/invitationsCreate an invitation
declinePOST /api/invitations/{key}/declineDecline an invitation
destroyDELETE /api/invitations/{key}Delete an invitation
listGET /api/invitationsList invitations
partial_updatePATCH /api/invitations/{key}Update an invitation
resendPOST /api/invitations/{key}/resendResend an invitation
retrieveGET /api/invitations/{key}Get invitation details

accept

accept(key,**kwargs)

Accept an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:(data,response)=api_client.invitations_api.accept(key,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.accept():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200The invitation is accepted-
400The invitation is expired or already accepted-

create

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

Create an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
invitation_write_requestInvitationWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

decline

decline(key,**kwargs)

Decline an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.decline(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.decline():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The invitation has been declined-

destroy

destroy(key,**kwargs)

Delete an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.destroy(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (‘owner’,)[optional]
sortstrWhich 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA unique value identifying this invitation.
patched_invitation_write_requestPatchedInvitationWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

resend

resend(key,**kwargs)

Resend an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.resend(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.resend():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204Invitation has been sent-
400The invitation is already accepted-

retrieve

retrieve(key,**kwargs)

Get invitation details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:(data,response)=api_client.invitations_api.retrieve(key,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.9 - IssuesApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/issuesCreate an issue
destroyDELETE /api/issues/{id}Delete an issue
listGET /api/issuesList issues
partial_updatePATCH /api/issues/{id}Update an issue
retrieveGET /api/issues/{id}Get issue details

create

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

Create an issue

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling IssuesApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
issue_write_requestIssueWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete an issue

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this issue.try:api_client.issues_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling IssuesApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling IssuesApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
assigneestrA simple equality filter for the assignee field[optional]
filterstrJSON 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_idintA simple equality filter for the frame_id field[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
resolvedboolA simple equality filter for the resolved field[optional]
searchstrA search term. Available search_fields: (‘owner’, ‘assignee’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘owner’, ‘assignee’, ‘id’, ‘job_id’, ’task_id’, ‘resolved’, ‘frame_id’][optional]
task_idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update an issue

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling IssuesApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this issue.
patched_issue_write_requestPatchedIssueWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get issue details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this issue.try:(data,response)=api_client.issues_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling IssuesApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.10 - JobsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/jobsCreate a job
create_annotationsPOST /api/jobs/{id}/annotations/Import annotations into a job
create_dataset_exportPOST /api/jobs/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
destroyDELETE /api/jobs/{id}Delete a job
destroy_annotationsDELETE /api/jobs/{id}/annotations/Delete job annotations
listGET /api/jobsList jobs
partial_updatePATCH /api/jobs/{id}Update a job
partial_update_annotationsPATCH /api/jobs/{id}/annotations/Update job annotations
partial_update_data_metaPATCH /api/jobs/{id}/data/metaUpdate metainformation for media files in a job
partial_update_validation_layoutPATCH /api/jobs/{id}/validation_layoutAllows updating current validation configuration
retrieveGET /api/jobs/{id}Get job details
retrieve_annotationsGET /api/jobs/{id}/annotations/Get job annotations
retrieve_dataGET /api/jobs/{id}/dataGet data of a job
retrieve_data_metaGET /api/jobs/{id}/data/metaGet metainformation for media files in a job
retrieve_previewGET /api/jobs/{id}/previewGet a preview image for a job
retrieve_validation_layoutGET /api/jobs/{id}/validation_layoutAllows getting current validation configuration
update_annotationsPUT /api/jobs/{id}/annotations/Replace job annotations

create

create(job_write_request,**kwargs)

Create a job

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
job_write_requestJobWriteRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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 initiates a background process to import annotations into a job. Please, use the GET /api/requests/<rq_id> endpoint for checking status of the process. Therq_id parameter can be found in the response on initiating request.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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 Trueannotation_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,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.create_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
cloud_storage_idintStorage id[optional]
filenamestrAnnotation file name[optional]
formatstrInput format name You can get the list of supported formats at: /server/annotation/formats[optional]
locationstrwhere to import the annotation from[optional]
use_default_locationboolUse 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_requestAnnotationFileRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Uploading has finished-
202Uploading has been started-
405Format 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 requestPOST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, useGET /api/requests/<rq_id> whererq_id is request ID returned in the response for this endpoint.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:format="format_example"# str | Desired output format name You can get the list of supported formats at: /server/annotation/formatsid=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 Falsetry:(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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.create_dataset_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
formatstrDesired output format name You can get the list of supported formats at: /server/annotation/formats
idintA unique integer value identifying this job.
cloud_storage_idintStorage id[optional]
filenamestrDesired output file name[optional]
locationstrWhere need to save downloaded dataset[optional]
save_imagesboolInclude 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Exporting has been started-
405Format is not available-
409Exporting 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:api_client.jobs_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The job has been deleted-

destroy_annotations

destroy_annotations(id,**kwargs)

Delete job annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:api_client.jobs_api.destroy_annotations(id,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.destroy_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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,parent_job_id=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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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', 'parent_job_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)parent_job_id=1# int | A simple equality filter for the parent_job_id field (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', 'parent_job_id'] (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,parent_job_id=parent_job_id,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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
assigneestrA simple equality filter for the assignee field[optional]
dimensionstrA simple equality filter for the dimension field[optional]
filterstrJSON 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’, ‘parent_job_id’].[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
parent_job_idintA simple equality filter for the parent_job_id field[optional]
project_idintA simple equality filter for the project_id field[optional]
project_namestrA simple equality filter for the project_name field[optional]
searchstrA search term. Available search_fields: (’task_name’, ‘project_name’, ‘assignee’, ‘state’, ‘stage’)[optional]
sortstrWhich 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’, ‘parent_job_id’][optional]
stagestrA simple equality filter for the stage field[optional]
statestrA simple equality filter for the state field[optional]
task_idintA simple equality filter for the task_id field[optional]
task_namestrA simple equality filter for the task_name field[optional]
typestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a job

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
patched_job_write_requestPatchedJobWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_annotations

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

Update job annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.partial_update_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
actionstr
idintA unique integer value identifying this job.
patched_labeled_data_requestPatchedLabeledDataRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Annotations 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.partial_update_data_meta():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
patched_job_data_meta_write_requestPatchedJobDataMetaWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_validation_layout

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

Allows updating current validation configuration

WARNING: this operation is not protected from race conditions. It’s up to the user to ensure no parallel calls to this operation happen. It affects image access, including exports with images, backups, chunk downloading etc.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.partial_update_validation_layout():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
patched_job_validation_layout_write_requestPatchedJobValidationLayoutWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get job details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:(data,response)=api_client.jobs_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_annotations

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

Get job annotations

Deprecation warning: Utilizing this endpoint to export job dataset in a specific format is no longer possible. 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, whererq_id is request id returned on initializing request -GET result_url to download a prepared file, whereresult_url can be found in the response on checking status request

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.action="action_example"# str | This parameter is no longer supported (optional)cloud_storage_id=1# int | This parameter is no longer supported (optional)filename="filename_example"# str | This parameter is no longer supported (optional)format="format_example"# str | This parameter is no longer supported (optional)location="cloud_storage"# str | This parameter is no longer supported (optional)try:(data,response)=api_client.jobs_api.retrieve_annotations(id,action=action,cloud_storage_id=cloud_storage_id,filename=filename,format=format,location=location,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
actionstrThis parameter is no longer supported[optional]
cloud_storage_idintThis parameter is no longer supported[optional]
filenamestrThis parameter is no longer supported[optional]
formatstrThis parameter is no longer supported[optional]
locationstrThis parameter is no longer supported[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-
410API endpoint no longer handles dataset exporting process-

retrieve_data

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

Get data of a job

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve_data():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
indexintA unique number value identifying chunk, starts from 0 for each job[optional]
numberintA unique number value identifying chunk or frame. The numbers are the same as for the task. Deprecated for chunks in favor of ‘index’[optional]
qualitystrSpecifies the quality level of the requested data[optional]
typestrSpecifies 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Data of a specific type-

retrieve_data_meta

retrieve_data_meta(id,**kwargs)

Get metainformation for media files in a job

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:(data,response)=api_client.jobs_api.retrieve_data_meta(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve_data_meta():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_preview

retrieve_preview(id,**kwargs)

Get a preview image for a job

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:api_client.jobs_api.retrieve_preview(id,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve_preview():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Job image preview-

retrieve_validation_layout

retrieve_validation_layout(id,**kwargs)

Allows getting current validation configuration

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.try:(data,response)=api_client.jobs_api.retrieve_validation_layout(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.retrieve_validation_layout():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

update_annotations

update_annotations(id,labeled_data_request=None,**kwargs)

Replace job annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this job.labeled_data_request=LabeledDataRequest(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",),],),],),],)# LabeledDataRequest |  (optional)try:api_client.jobs_api.update_annotations(id,labeled_data_request=labeled_data_request,)exceptexceptions.ApiExceptionase:print("Exception when calling JobsApi.update_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this job.
labeled_data_requestLabeledDataRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Annotations have been replaced-

1.1.11 - LabelsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
destroyDELETE /api/labels/{id}Delete a label
listGET /api/labelsList labels
partial_updatePATCH /api/labels/{id}Update a label
retrieveGET /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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this label.try:api_client.labels_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling LabelsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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="any"# 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)exceptexceptions.ApiExceptionase:print("Exception when calling LabelsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
colorstrA simple equality filter for the color field[optional]
filterstrJSON 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_idintA simple equality filter for job id[optional]
namestrA simple equality filter for the name field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
parentstrA simple equality filter for the parent field[optional]
parent_idintA simple equality filter for the parent_id field[optional]
project_idintA simple equality filter for project id[optional]
searchstrA search term. Available search_fields: (’name’, ‘parent’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [’name’, ‘parent’, ‘id’, ’type’, ‘color’, ‘parent_id’][optional]
task_idintA simple equality filter for task id[optional]
typestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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=None,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=None,has_parent=True,),],)# PatchedLabelRequest |  (optional)try:(data,response)=api_client.labels_api.partial_update(id,patched_label_request=patched_label_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling LabelsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this label.
patched_label_requestPatchedLabelRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get label details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this label.try:(data,response)=api_client.labels_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling LabelsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.12 - LambdaApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_functionsPOST /api/lambda/functions/{func_id}
create_requestsPOST /api/lambda/requestsMethod calls the function
delete_requestsDELETE /api/lambda/requests/{id}Method cancels the request
list_functionsGET /api/lambda/functionsMethod returns a list of functions
list_requestsGET /api/lambda/requestsMethod returns a list of requests
retrieve_functionsGET /api/lambda/functions/{func_id}Method returns the information about the function
retrieve_requestsGET /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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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,)exceptexceptions.ApiExceptionase:print("Exception when calling LambdaApi.create_functions():%s\n"%e)

Parameters

NameTypeDescriptionNotes
func_idstr
online_function_call_requestOnlineFunctionCallRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Returns function invocation results-

create_requests

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

Method calls the function

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling LambdaApi.create_requests():%s\n"%e)

Parameters

NameTypeDescriptionNotes
function_call_requestFunctionCallRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

delete_requests

delete_requests(id,**kwargs)

Method cancels the request

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id="id_example"# str | Request idtry:api_client.lambda_api.delete_requests(id,)exceptexceptions.ApiExceptionase:print("Exception when calling LambdaApi.delete_requests():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idstrRequest 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204No response body-

list_functions

list_functions(**kwargs)

Method returns a list of functions

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:api_client.lambda_api.list_functions()exceptexceptions.ApiExceptionase: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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200No response body-

list_requests

list_requests(**kwargs)

Method returns a list of requests

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.lambda_api.list_requests()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_functions

retrieve_functions(func_id,**kwargs)

Method returns the information about the function

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:func_id="2"# str |try:(data,response)=api_client.lambda_api.retrieve_functions(func_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling LambdaApi.retrieve_functions():%s\n"%e)

Parameters

NameTypeDescriptionNotes
func_idstr

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Information about the function-

retrieve_requests

retrieve_requests(id,**kwargs)

Method returns the status of the request

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id="id_example"# str | Request idtry:(data,response)=api_client.lambda_api.retrieve_requests(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling LambdaApi.retrieve_requests():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idstrRequest 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.13 - MembershipsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
destroyDELETE /api/memberships/{id}Delete a membership
listGET /api/membershipsList memberships
partial_updatePATCH /api/memberships/{id}Update a membership
retrieveGET /api/memberships/{id}Get membership details

destroy

destroy(id,**kwargs)

Delete a membership

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this membership.try:api_client.memberships_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling MembershipsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling MembershipsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
rolestrA simple equality filter for the role field[optional]
searchstrA search term. Available search_fields: (‘user’, ‘role’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘user’, ‘role’, ‘id’][optional]
userstrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a membership

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling MembershipsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this membership.
patched_membership_write_requestPatchedMembershipWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get membership details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this membership.try:(data,response)=api_client.memberships_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling MembershipsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.14 - OrganizationsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/organizationsCreate an organization
destroyDELETE /api/organizations/{id}Delete an organization
listGET /api/organizationsList organizations
partial_updatePATCH /api/organizations/{id}Update an organization
retrieveGET /api/organizations/{id}Get organization details

create

create(organization_write_request,**kwargs)

Create an organization

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling OrganizationsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
organization_write_requestOrganizationWriteRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete an organization

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this organization.try:api_client.organizations_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling OrganizationsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling OrganizationsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
filterstrJSON 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]
namestrA simple equality filter for the name field[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (’name’, ‘owner’, ‘slug’)[optional]
slugstrA simple equality filter for the slug field[optional]
sortstrWhich 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update an organization

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling OrganizationsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this organization.
patched_organization_write_requestPatchedOrganizationWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get organization details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this organization.try:(data,response)=api_client.organizations_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling OrganizationsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.15 - ProjectsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/projectsCreate a project
create_backupPOST /api/projects/backup/Recreate a project from a backup
create_backup_exportPOST /api/projects/{id}/backup/exportInitiate process to backup resource
create_datasetPOST /api/projects/{id}/dataset/Import a dataset into a project
create_dataset_exportPOST /api/projects/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
destroyDELETE /api/projects/{id}Delete a project
listGET /api/projectsList projects
partial_updatePATCH /api/projects/{id}Update a project
retrieveGET /api/projects/{id}Get project details
retrieve_previewGET /api/projects/{id}/previewGet a preview image for a project

create

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

Create a project

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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=None,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=None,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)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
project_write_requestProjectWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

create_backup

create_backup(x_organization=None,cloud_storage_id=None,filename=None,location=None,org=None,org_id=None,project_file_request=None,**kwargs)

Recreate a project from a backup

The backup import process is as follows: The first request POST /api/projects/backup schedules a background job on the server in which the process of creating a project from the uploaded backup is carried out. To check the status of the import process, use GET /api/requests/rq_id, where rq_id is the request ID obtained from the response to the previous request. Once the import completes successfully, the response will contain the ID of the newly created project in the result_id field.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)project_file_request=ProjectFileRequest(project_file=open('/path/to/file','rb'),)# ProjectFileRequest |  (optional)try:(data,response)=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,project_file_request=project_file_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.create_backup():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
cloud_storage_idintStorage id[optional]
filenamestrBackup file name[optional]
locationstrWhere to import the backup file from[optional] if omitted the server will use the default value of “local”
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
project_file_requestProjectFileRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Import of the backup file has started-

create_backup_export

create_backup_export(id,cloud_storage_id=None,filename=None,location=None,**kwargs)

Initiate process to backup resource

The requestPOST /api/<projects|tasks>/id/backup/export will initialize a background process to backup a resource. To check status of the process please, useGET /api/requests/<rq_id> whererq_id is request ID returned in the response for this endpoint.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.create_backup_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this project.
cloud_storage_idintStorage id[optional]
filenamestrBackup file name[optional]
locationstrWhere 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Creating a backup file has been started-
400Wrong query parameters were passed-
409The 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,dataset_file_request=None,**kwargs)

Import a dataset into a project

The request POST /api/projects/id/dataset initiates a background process to import dataset into a project. Please, use the GET /api/requests/<rq_id> endpoint for checking status of the process. Therq_id parameter can be found in the response on initiating request.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)dataset_file_request=DatasetFileRequest(dataset_file=open('/path/to/file','rb'),)# DatasetFileRequest |  (optional)try:(data,response)=api_client.projects_api.create_dataset(id,cloud_storage_id=cloud_storage_id,filename=filename,format=format,location=location,dataset_file_request=dataset_file_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.create_dataset():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this project.
cloud_storage_idintStorage id[optional]
filenamestrDataset file name[optional]
formatstrDesired dataset format name You can get the list of supported formats at: /server/annotation/formats[optional]
locationstrWhere to import the dataset from[optional]
dataset_file_requestDatasetFileRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Importing has been started-
400Failed to import dataset-
405Format 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 requestPOST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, useGET /api/requests/<rq_id> whererq_id is request ID returned in the response for this endpoint.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:format="format_example"# str | Desired output format name You can get the list of supported formats at: /server/annotation/formatsid=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 Falsetry:(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)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.create_dataset_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
formatstrDesired output format name You can get the list of supported formats at: /server/annotation/formats
idintA unique integer value identifying this project.
cloud_storage_idintStorage id[optional]
filenamestrDesired output file name[optional]
locationstrWhere need to save downloaded dataset[optional]
save_imagesboolInclude 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

destroy

destroy(id,**kwargs)

Delete a project

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this project.try:api_client.projects_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
assigneestrA simple equality filter for the assignee field[optional]
filterstrJSON 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]
namestrA simple equality filter for the name field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (’name’, ‘owner’, ‘assignee’, ‘status’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [’name’, ‘owner’, ‘assignee’, ‘status’, ‘id’, ‘updated_date’][optional]
statusstrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a project

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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=None,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=None,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)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this project.
patched_project_write_requestPatchedProjectWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get project details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this project.try:(data,response)=api_client.projects_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_preview

retrieve_preview(id,**kwargs)

Get a preview image for a project

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this project.try:api_client.projects_api.retrieve_preview(id,)exceptexceptions.ApiExceptionase:print("Exception when calling ProjectsApi.retrieve_preview():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Project image preview-
404Project image preview not found-

1.1.16 - QualityApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_reportPOST /api/quality/reportsCreate a quality report
list_conflictsGET /api/quality/conflictsList annotation conflicts in a quality report
list_reportsGET /api/quality/reportsMethod returns a paginated list of quality reports.
list_settingsGET /api/quality/settingsList quality settings instances
partial_update_settingsPATCH /api/quality/settings/{id}Update a quality settings instance
retrieve_reportGET /api/quality/reports/{id}Get quality report details
retrieve_report_dataGET /api/quality/reports/{id}/dataGet quality report contents
retrieve_settingsGET /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

Deprecation warning: Utilizing this endpoint to check the computation status is no longer possible. Consider using common requests API: GET /api/requests/<rq_id>

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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,project_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)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.create_report():%s\n"%e)

Parameters

NameTypeDescriptionNotes
rq_idstrThe report creation request id. Can be specified to check the report creation status.[optional]
quality_report_create_requestQualityReportCreateRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-
202A 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.-
400Invalid 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,project_id=None,report_id=None,severity=None,sort=None,task_id=None,type=None,**kwargs)

List annotation conflicts in a quality report

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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', 'project_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)project_id=1# int | A simple equality filter for the project_id field (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', 'project_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,project_id=project_id,report_id=report_id,severity=severity,sort=sort,task_id=task_id,type=type,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.list_conflicts():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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’, ‘project_id’, ‘severity’].[optional]
frameintA simple equality filter for the frame field[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
project_idintA simple equality filter for the project_id field[optional]
report_idintA simple equality filter for report id[optional]
severitystrA simple equality filter for the severity field[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘id’, ‘frame’, ’type’, ‘job_id’, ’task_id’, ‘project_id’, ‘severity’][optional]
task_idintA simple equality filter for the task_id field[optional]
typestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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,project_id=None,sort=None,target=None,task_id=None,**kwargs)

Method returns a paginated list of quality reports.

Please note that children reports are included by default if the "task_id", "project_id" filters are used. If you want to restrict the list of results to a specific report type, use the "target" parameter. The "parent_id" filter includes all the nested reports recursively. For instance, if the "parent_id" is a project report, all the related task and job reports will be returned. Please note that a report can be reused in several parent reports, but the "parent_id" field in responses will include only the first parent report id. The "parent_id" filter still returns all the relevant nested reports, even though the response "parent_id" values may be different from the requested one.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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', 'task_id', 'project_id', 'created_date', 'gt_last_updated', 'target_last_updated']. (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 parent id (optional)project_id=1# int | A simple equality filter for project id (optional)sort="sort_example"# str | Which field to use when ordering the results. Available ordering_fields: ['id', 'job_id', 'task_id', 'project_id', 'created_date', 'gt_last_updated', 'target_last_updated'] (optional)target="job"# 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,project_id=project_id,sort=sort,target=target,task_id=task_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.list_reports():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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’, ’task_id’, ‘project_id’, ‘created_date’, ‘gt_last_updated’, ’target_last_updated’].[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
parent_idintA simple equality filter for parent id[optional]
project_idintA simple equality filter for project id[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘id’, ‘job_id’, ’task_id’, ‘project_id’, ‘created_date’, ‘gt_last_updated’, ’target_last_updated’][optional]
targetstrA simple equality filter for target[optional]
task_idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

list_settings

list_settings(x_organization=None,filter=None,inherit=None,org=None,org_id=None,page=None,page_size=None,parent_type=None,project_id=None,sort=None,task_id=None,**kwargs)

List quality settings instances

Please note that child task settings are included by default if the "project_id" filter is used. If you want to restrict results only to a specific parent type, use the "parent_type" parameter.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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', 'project_id', 'inherit', 'created_date', 'updated_date']. (optional)inherit=True# bool | A simple equality filter for the inherit 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_type="project"# str | A simple equality filter for parent instance type (optional)project_id=1# int | A simple equality filter for project id (optional)sort="sort_example"# str | Which field to use when ordering the results. Available ordering_fields: ['id', 'task_id', 'project_id', 'inherit', 'created_date', 'updated_date'] (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,inherit=inherit,org=org,org_id=org_id,page=page,page_size=page_size,parent_type=parent_type,project_id=project_id,sort=sort,task_id=task_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.list_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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’, ‘project_id’, ‘inherit’, ‘created_date’, ‘updated_date’].[optional]
inheritboolA simple equality filter for the inherit field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
parent_typestrA simple equality filter for parent instance type[optional]
project_idintA simple equality filter for project id[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘id’, ’task_id’, ‘project_id’, ‘inherit’, ‘created_date’, ‘updated_date’][optional]
task_idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_settings

partial_update_settings(id,patched_quality_settings_request=None,**kwargs)

Update a quality settings instance

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | An id of a quality settings instancepatched_quality_settings_request=PatchedQualitySettingsRequest(job_filter="job_filter_example",inherit=True,target_metric=None,target_metric_threshold=0,max_validations_per_job=0,iou_threshold=0.4,oks_sigma=0.09,point_size_base=None,line_thickness=0.01,low_overlap_threshold=0.8,compare_line_orientation=True,line_orientation_threshold=0.1,compare_groups=True,group_match_threshold=0.5,check_covered_annotations=True,object_visibility_threshold=0.05,panoptic_comparison=True,compare_attributes=True,empty_is_annotated=False,)# PatchedQualitySettingsRequest |  (optional)try:(data,response)=api_client.quality_api.partial_update_settings(id,patched_quality_settings_request=patched_quality_settings_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.partial_update_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintAn id of a quality settings instance
patched_quality_settings_requestPatchedQualitySettingsRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_report

retrieve_report(id,**kwargs)

Get quality report details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this quality report.try:(data,response)=api_client.quality_api.retrieve_report(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.retrieve_report():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_report_data

retrieve_report_data(id,**kwargs)

Get quality report contents

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.retrieve_report_data():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_settings

retrieve_settings(id,**kwargs)

Get quality settings instance details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | An id of a quality settings instancetry:(data,response)=api_client.quality_api.retrieve_settings(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling QualityApi.retrieve_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintAn 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.17 - RequestsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_cancelPOST /api/requests/{id}/cancelCancel request
listGET /api/requestsList requests
retrieveGET /api/requests/{id}Get request details

create_cancel

create_cancel(id,**kwargs)

Cancel request

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id="id_example"# str |try:api_client.requests_api.create_cancel(id,)exceptexceptions.ApiExceptionase:print("Exception when calling RequestsApi.create_cancel():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idstr

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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:action="action_example"# 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="subresource_example"# str | A simple equality filter for the subresource field (optional)target="target_example"# 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)exceptexceptions.ApiExceptionase:print("Exception when calling RequestsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
actionstrA simple equality filter for the action field[optional]
filterstrJSON 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]
formatstrA simple equality filter for the format field[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrA simple equality filter for the org field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
project_idintA simple equality filter for the project_id field[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘created_date’, ‘status’, ‘action’][optional]
statusstrA simple equality filter for the status field[optional]
subresourcestrA simple equality filter for the subresource field[optional]
targetstrA simple equality filter for the target field[optional]
task_idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get request details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id="id_example"# str |try:(data,response)=api_client.requests_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling RequestsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idstr

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.18 - SchemaApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
retrieveGET /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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:lang="af"# str |  (optional)scheme="json"# str |  (optional)try:(data,response)=api_client.schema_api.retrieve(lang=lang,scheme=scheme,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling SchemaApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
langstr[optional]
schemestr[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, 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 codeDescriptionResponse headers
200-

1.1.19 - ServerApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
list_shareGET /api/server/shareList files/directories in the mounted share
retrieve_aboutGET /api/server/aboutGet basic CVAT information
retrieve_annotation_formatsGET /api/server/annotation/formatsGet supported annotation formats
retrieve_pluginsGET /api/server/pluginsGet enabled plugins

list_share

list_share(directory=None,search=None,**kwargs)

List files/directories in the mounted share

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling ServerApi.list_share():%s\n"%e)

Parameters

NameTypeDescriptionNotes
directorystrDirectory to browse[optional]
searchstrSearch 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_about

retrieve_about(**kwargs)

Get basic CVAT information

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.server_api.retrieve_about()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_annotation_formats

retrieve_annotation_formats(**kwargs)

Get supported annotation formats

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.server_api.retrieve_annotation_formats()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_plugins

retrieve_plugins(**kwargs)

Get enabled plugins

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.server_api.retrieve_plugins()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.20 - TasksApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/tasksCreate a task
create_annotationsPOST /api/tasks/{id}/annotations/Import annotations into a task
create_backupPOST /api/tasks/backup/Recreate a task from a backup
create_backup_exportPOST /api/tasks/{id}/backup/exportInitiate process to backup resource
create_dataPOST /api/tasks/{id}/data/Attach data to a task
create_dataset_exportPOST /api/tasks/{id}/dataset/exportInitialize process to export resource as a dataset in a specific format
destroyDELETE /api/tasks/{id}Delete a task
destroy_annotationsDELETE /api/tasks/{id}/annotations/Delete task annotations
listGET /api/tasksList tasks
partial_updatePATCH /api/tasks/{id}Update a task
partial_update_annotationsPATCH /api/tasks/{id}/annotations/Update task annotations
partial_update_data_metaPATCH /api/tasks/{id}/data/metaUpdate metainformation for media files in a task
partial_update_validation_layoutPATCH /api/tasks/{id}/validation_layoutAllows updating current validation configuration
retrieveGET /api/tasks/{id}Get task details
retrieve_annotationsGET /api/tasks/{id}/annotations/Get task annotations
retrieve_dataGET /api/tasks/{id}/data/Get data of a task
retrieve_data_metaGET /api/tasks/{id}/data/metaGet metainformation for media files in a task
retrieve_previewGET /api/tasks/{id}/previewGet a preview image for a task
retrieve_statusGET /api/tasks/{id}/statusGet the creation status of a task
retrieve_validation_layoutGET /api/tasks/{id}/validation_layoutAllows getting current validation configuration
update_annotationsPUT /api/tasks/{id}/annotations/Replace task annotations

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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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=None,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=None,has_parent=True,),],),],subset="subset_example",target_storage=PatchedTaskWriteRequestTargetStorage(None),source_storage=PatchedTaskWriteRequestTargetStorage(None),consensus_replicas=0,)# 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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
task_write_requestTaskWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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 task

The request POST /api/tasks/id/annotations initiates a background process to import annotations into a task. Please, use the GET /api/requests/<rq_id> endpoint for checking status of the process. Therq_id parameter can be found in the response on initiating request.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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 Trueannotation_file_request=AnnotationFileRequest(annotation_file=open('/path/to/file','rb'),)# AnnotationFileRequest |  (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,annotation_file_request=annotation_file_request,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
cloud_storage_idintStorage id[optional]
filenamestrAnnotation file name[optional]
formatstrInput format name You can get the list of supported formats at: /server/annotation/formats[optional]
locationstrwhere to import the annotation from[optional]
use_default_locationboolUse the location that was configured in task to import annotations[optional] if omitted the server will use the default value of True
annotation_file_requestAnnotationFileRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Uploading has finished-
202Uploading has been started-
405Format is not available-

create_backup

create_backup(x_organization=None,cloud_storage_id=None,filename=None,location=None,org=None,org_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 creates a background job on the server in which the process of a task creating from an uploaded backup is carried out. To check the status of the import process, use GET /api/requests/rq_id, where rq_id is the request ID obtained from the response to the previous request. Once the import completes successfully, the response will contain the ID of the newly created task in the result_id field.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)task_file_request=TaskFileRequest(task_file=open('/path/to/file','rb'),)# TaskFileRequest |  (optional)try:(data,response)=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,task_file_request=task_file_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create_backup():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
cloud_storage_idintStorage id[optional]
filenamestrBackup file name[optional]
locationstrWhere to import the backup file from[optional] if omitted the server will use the default value of “local”
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
task_file_requestTaskFileRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Import of the backup file has started-

create_backup_export

create_backup_export(id,cloud_storage_id=None,filename=None,location=None,**kwargs)

Initiate process to backup resource

The requestPOST /api/<projects|tasks>/id/backup/export will initialize a background process to backup a resource. To check status of the process please, useGET /api/requests/<rq_id> whererq_id is request ID returned in the response for this endpoint.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create_backup_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
cloud_storage_idintStorage id[optional]
filenamestrBackup file name[optional]
locationstrWhere 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Creating a backup file has been started-
400Wrong query parameters were passed-
409The 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 theGET /api/requests/<rq_id>, whererq_id is request ID returned for this request. Once data is attached to a task, it cannot be detached or replaced.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create_data():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
upload_finishboolFinishes data upload. Can be combined with Upload-Start header to create task data with one request[optional]
upload_multipleboolIndicates that data with this request are single or multiple files that should be attached to a task[optional]
upload_startboolInitializes data upload. Optionally, can include upload metadata in the request body.[optional]
data_requestDataRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
202Request 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 requestPOST /api/<projects|tasks|jobs>/id/dataset/export will initialize a background process to export a dataset. To check status of the process please, useGET /api/requests/<rq_id> whererq_id is request ID returned in the response for this endpoint.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:format="format_example"# str | Desired output format name You can get the list of supported formats at: /server/annotation/formatsid=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 Falsetry:(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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.create_dataset_export():%s\n"%e)

Parameters

NameTypeDescriptionNotes
formatstrDesired output format name You can get the list of supported formats at: /server/annotation/formats
idintA unique integer value identifying this task.
cloud_storage_idintStorage id[optional]
filenamestrDesired output file name[optional]
locationstrWhere need to save downloaded dataset[optional]
save_imagesboolInclude 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

destroy

destroy(id,**kwargs)

Delete a task

All attached jobs, annotations and data will be deleted as well.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:api_client.tasks_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The task has been deleted-

destroy_annotations

destroy_annotations(id,**kwargs)

Delete task annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:api_client.tasks_api.destroy_annotations(id,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.destroy_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
assigneestrA simple equality filter for the assignee field[optional]
dimensionstrA simple equality filter for the dimension field[optional]
filterstrJSON 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]
modestrA simple equality filter for the mode field[optional]
namestrA simple equality filter for the name field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
project_idintA simple equality filter for the project_id field[optional]
project_namestrA simple equality filter for the project_name field[optional]
searchstrA search term. Available search_fields: (‘project_name’, ’name’, ‘owner’, ‘status’, ‘assignee’, ‘subset’, ‘mode’, ‘dimension’, ’tracker_link’, ‘validation_mode’)[optional]
sortstrWhich 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]
statusstrA simple equality filter for the status field[optional]
subsetstrA simple equality filter for the subset field[optional]
tracker_linkstrA simple equality filter for the tracker_link field[optional]
validation_modestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a task

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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=None,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=None,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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
patched_task_write_requestPatchedTaskWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_annotations

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

Update task annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.partial_update_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
actionstr
idintA unique integer value identifying this task.
patched_labeled_data_requestPatchedLabeledDataRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.partial_update_data_meta():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
patched_data_meta_write_requestPatchedDataMetaWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_validation_layout

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

Allows updating current validation configuration

WARNING: this operation is not protected from race conditions. It’s up to the user to ensure no parallel calls to this operation happen. It affects image access, including exports with images, backups, chunk downloading etc.

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.partial_update_validation_layout():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
patched_task_validation_layout_write_requestPatchedTaskValidationLayoutWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get task details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:(data,response)=api_client.tasks_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_annotations

retrieve_annotations(id,**kwargs)

Get task annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:(data,response)=api_client.tasks_api.retrieve_annotations(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-
400Exporting without data is not allowed-
410API endpoint no longer handles exporting process-

retrieve_data

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

Get data of a task

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_data():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
numberintA unique number value identifying chunk or frame[optional]
qualitystrSpecifies the quality level of the requested data[optional]
typestrSpecifies 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Data 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:(data,response)=api_client.tasks_api.retrieve_data_meta(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_data_meta():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_preview

retrieve_preview(id,**kwargs)

Get a preview image for a task

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:api_client.tasks_api.retrieve_preview(id,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_preview():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Task image preview-
404Task 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:(data,response)=api_client.tasks_api.retrieve_status(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_status():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_validation_layout

retrieve_validation_layout(id,**kwargs)

Allows getting current validation configuration

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.try:(data,response)=api_client.tasks_api.retrieve_validation_layout(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.retrieve_validation_layout():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

update_annotations

update_annotations(id,labeled_data_request=None,**kwargs)

Replace task annotations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this task.labeled_data_request=LabeledDataRequest(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",),],),],),],)# LabeledDataRequest |  (optional)try:api_client.tasks_api.update_annotations(id,labeled_data_request=labeled_data_request,)exceptexceptions.ApiExceptionase:print("Exception when calling TasksApi.update_annotations():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this task.
labeled_data_requestLabeledDataRequest[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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Annotations have been replaced-

1.1.21 - UsersApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
destroyDELETE /api/users/{id}Delete a user
listGET /api/usersList users
partial_updatePATCH /api/users/{id}Update a user
retrieveGET /api/users/{id}Get user details
retrieve_selfGET /api/users/selfGet details of the current user

destroy

destroy(id,**kwargs)

Delete a user

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this user.try:api_client.users_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling UsersApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling UsersApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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_namestrA simple equality filter for the first_name field[optional]
is_activeboolA simple equality filter for the is_active field[optional]
last_namestrA simple equality filter for the last_name field[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (‘username’, ‘first_name’, ’last_name’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘username’, ‘first_name’, ’last_name’, ‘id’, ‘is_active’][optional]
usernamestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a user

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling UsersApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this user.
patched_user_requestPatchedUserRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get user details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this user.try:(data,response)=api_client.users_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling UsersApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:try:(data,response)=api_client.users_api.retrieve_self()pprint(data)exceptexceptions.ApiExceptionase: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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.1.22 - WebhooksApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/webhooksCreate a webhook
create_deliveries_redeliveryPOST /api/webhooks/{id}/deliveries/{delivery_id}/redeliveryRedeliver a webhook delivery
create_pingPOST /api/webhooks/{id}/pingSend a ping webhook
destroyDELETE /api/webhooks/{id}Delete a webhook
listGET /api/webhooksList webhooks
list_deliveriesGET /api/webhooks/{id}/deliveriesList deliveries for a webhook
partial_updatePATCH /api/webhooks/{id}Update a webhook
retrieveGET /api/webhooks/{id}Get webhook details
retrieve_deliveriesGET /api/webhooks/{id}/deliveries/{delivery_id}Get details of a webhook delivery
retrieve_eventsGET /api/webhooks/eventsList available webhook events
updatePUT /api/webhooks/{id}Replace a webhook

create

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

Create a webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
webhook_write_requestWebhookWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

create_deliveries_redelivery

create_deliveries_redelivery(delivery_id,id,**kwargs)

Redeliver a webhook delivery

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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,)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create_deliveries_redelivery():%s\n"%e)

Parameters

NameTypeDescriptionNotes
delivery_idstr
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200No response body-

create_ping

create_ping(id,**kwargs)

Send a ping webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this webhook.try:(data,response)=api_client.webhooks_api.create_ping(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create_ping():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

destroy

destroy(id,**kwargs)

Delete a webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this webhook.try:api_client.webhooks_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
project_idintA simple equality filter for the project_id field[optional]
searchstrA search term. Available search_fields: (’target_url’, ‘owner’, ’type’, ‘description’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [’target_url’, ‘owner’, ’type’, ‘description’, ‘id’, ‘project_id’, ‘updated_date’][optional]
target_urlstrA simple equality filter for the target_url field[optional]
typestrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

list_deliveries

list_deliveries(id,page=None,page_size=None,**kwargs)

List deliveries for a webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.list_deliveries():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
pageintA page number within the paginated result set.[optional]
page_sizeintNumber 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
patched_webhook_write_requestPatchedWebhookWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get webhook details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this webhook.try:(data,response)=api_client.webhooks_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_deliveries

retrieve_deliveries(delivery_id,id,**kwargs)

Get details of a webhook delivery

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve_deliveries():%s\n"%e)

Parameters

NameTypeDescriptionNotes
delivery_idstr
idintA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_events

retrieve_events(type=None,**kwargs)

List available webhook events

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:type="type_example"# str | Type of webhook (optional)try:(data,response)=api_client.webhooks_api.retrieve_events(type=type,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve_events():%s\n"%e)

Parameters

NameTypeDescriptionNotes
typestrType 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

update

update(id,webhook_write_request,**kwargs)

Replace a webhook

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
webhook_write_requestWebhookWriteRequest

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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

1.2 - Models

1.2.1 - About class reference

Properties

NameTypeDescriptionNotes
namestr
descriptionstr
versionstr
logo_urlstr
subtitlestr

1.2.2 - AcceptInvitationRead class reference

Properties

NameTypeDescriptionNotes
organization_slugstr

1.2.3 - AnnotationConflict class reference

Properties

NameTypeDescriptionNotes
annotation_ids[AnnotationId]
idint[optional] [readonly]
frameint[optional] [readonly]
typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
report_idint[optional] [readonly]
severitybool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]

1.2.4 - AnnotationConflictAnnotationType class reference

  • `tag` - TAG * `shape` - SHAPE * `track` - TRACK

Properties

NameTypeDescriptionNotes
valuestr*tag - TAG *shape - SHAPE *track - TRACKmust be one of [“tag”, “shape”, “track”, ]

1.2.5 - AnnotationConflictSeverity class reference

  • `warning` - WARNING * `error` - ERROR

Properties

NameTypeDescriptionNotes
valuestr*warning - WARNING *error - ERRORmust be one of [“warning”, “error”, ]

1.2.6 - AnnotationConflictType 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

NameTypeDescriptionNotes
valuestr*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_ANNOTATIONmust be one of [“missing_annotation”, “extra_annotation”, “mismatching_label”, “low_overlap”, “mismatching_direction”, “mismatching_attributes”, “mismatching_groups”, “covered_annotation”, ]

1.2.7 - AnnotationFileRequest class reference

Properties

NameTypeDescriptionNotes
annotation_filefile_type

1.2.8 - AnnotationGuideRead class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
task_idint, none_type[optional] [readonly]
project_idint, none_type[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
markdownstr[optional] [readonly]

1.2.9 - AnnotationGuideWriteRequest class reference

Properties

NameTypeDescriptionNotes
task_idint, none_type[optional]
project_idint, none_type[optional]
markdownstr[optional]

1.2.10 - AnnotationId class reference

Properties

NameTypeDescriptionNotes
obj_idint[optional] [readonly]
job_idint[optional] [readonly]
typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
shape_typeAnnotationIdShapeType[optional]

1.2.11 - AnnotationIdShapeType class reference

Properties

NameTypeDescriptionNotes

1.2.12 - AssetRead class reference

Properties

NameTypeDescriptionNotes
filenamestr
uuidstr[optional] [readonly]
created_datedatetime[optional] [readonly]
ownerBasicUser[optional]
guide_idint[optional] [readonly]

1.2.13 - Attribute class reference

Properties

NameTypeDescriptionNotes
namestr
mutablebool
input_typeInputTypeEnum
values[str]
idint[optional]
default_valuestr[optional]

1.2.14 - AttributeRequest class reference

Properties

NameTypeDescriptionNotes
namestr
mutablebool
input_typeInputTypeEnum
values[str]
idint[optional]
default_valuestr[optional]

1.2.15 - AttributeVal class reference

Properties

NameTypeDescriptionNotes
spec_idint
valuestr

1.2.16 - AttributeValRequest class reference

Properties

NameTypeDescriptionNotes
spec_idint
valuestr

1.2.17 - BasicOrganization class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
slugstr[optional] [readonly]

1.2.18 - BasicUser class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
urlstr[optional] [readonly]
idint[optional] [readonly]
first_namestr[optional]
last_namestr[optional]

1.2.19 - BasicUserRequest class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
first_namestr[optional]
last_namestr[optional]

1.2.20 - ChunkType class reference

  • `video` - VIDEO * `imageset` - IMAGESET * `list` - LIST

Properties

NameTypeDescriptionNotes
valuestr*video - VIDEO *imageset - IMAGESET *list - LISTmust be one of [“video”, “imageset”, “list”, ]

1.2.21 - ClientEvents class reference

Properties

NameTypeDescriptionNotes
timestampdatetime
events[Event][optional] if omitted the server will use the default value of []

1.2.22 - ClientEventsRequest class reference

Properties

NameTypeDescriptionNotes
timestampdatetime
events[EventRequest][optional] if omitted the server will use the default value of []
previous_eventClientEventsRequestPreviousEvent[optional]

1.2.23 - ClientEventsRequestPreviousEvent class reference

Properties

NameTypeDescriptionNotes
scopestr
timestampdatetime
obj_namestr, none_type[optional]
obj_idint, none_type[optional]
obj_valstr, none_type[optional]
sourcestr, none_type[optional]
countint, none_type[optional]
durationint[optional] if omitted the server will use the default value of 0
project_idint, none_type[optional]
task_idint, none_type[optional]
job_idint, none_type[optional]
user_idint, none_type[optional]
user_namestr, none_type[optional]
user_emailstr, none_type[optional]
org_idint, none_type[optional]
org_slugstr, none_type[optional]
payloadstr, none_type[optional]

1.2.24 - CloudStorageContent class reference

Properties

NameTypeDescriptionNotes
content[FileInfo]
nextstr, none_typeThis token is used to continue listing files in the bucket.[optional]

1.2.25 - CloudStorageRead class reference

Properties

NameTypeDescriptionNotes
provider_typeProviderTypeEnum
resourcestr
display_namestr
credentials_typeCredentialsTypeEnum
idint[optional] [readonly]
ownerCloudStorageReadOwner[optional]
manifests[str][optional] if omitted the server will use the default value of []
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
specific_attributesstr[optional]
descriptionstr[optional]
organizationint, none_type[optional] [readonly]

1.2.26 - CloudStorageReadOwner class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
urlstr[optional] [readonly]
idint[optional] [readonly]
first_namestr[optional]
last_namestr[optional]

1.2.27 - CloudStorageWriteRequest class reference

Properties

NameTypeDescriptionNotes
provider_typeProviderTypeEnum
resourcestr
display_namestr
credentials_typeCredentialsTypeEnum
ownerBasicUserRequest[optional]
session_tokenstr[optional]
account_namestr[optional]
keystr[optional]
secret_keystr[optional]
connection_stringstr[optional]
key_filefile_type[optional]
specific_attributesstr[optional]
descriptionstr[optional]
manifests[str][optional] if omitted the server will use the default value of []

1.2.28 - CommentRead class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
issueint[optional] [readonly]
ownerCloudStorageReadOwner[optional]
messagestr[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]

1.2.29 - CommentsSummary class reference

Properties

NameTypeDescriptionNotes
countint[optional] if omitted the server will use the default value of 0
urlstr[optional] [readonly]

1.2.30 - CommentWriteRequest class reference

Properties

NameTypeDescriptionNotes
issueint
messagestr[optional]

1.2.31 - ConsensusMergeCreateRequest class reference

Properties

NameTypeDescriptionNotes
task_idint[optional]
job_idint[optional]

1.2.32 - ConsensusSettings class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
task_idint[optional] [readonly]
iou_thresholdfloatPairwise annotation matching IoU threshold[optional]
quorumfloatMinimum required share of sources having an annotation for it to be accepted[optional]

1.2.33 - 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

NameTypeDescriptionNotes
valuestr*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_STRINGmust be one of [“KEY_SECRET_KEY_PAIR”, “ACCOUNT_NAME_TOKEN_PAIR”, “KEY_FILE_PATH”, “ANONYMOUS_ACCESS”, “CONNECTION_STRING”, ]

1.2.34 - DataMetaRead class reference

Properties

NameTypeDescriptionNotes
chunks_updated_datedatetime
image_qualityint
frames[FrameMeta], none_type
deleted_frames[int]
chunk_sizeint, none_type[optional] [readonly]
sizeintThe number of frames included. Deleted frames do not affect this value.[optional] [readonly]
start_frameint[optional] [readonly]
stop_frameint[optional] [readonly]
frame_filterstr[optional] [readonly]
included_frames[int], none_typeA list of valid frame ids. The None value means all frames are included.[optional]

1.2.35 - DataRequest class reference

Read more about parameters here:https://docs.cvat.ai/docs/manual/basics/create-annotation-task/#advanced-configuration

Properties

NameTypeDescriptionNotes
image_qualityintImage quality to use during annotation
chunk_sizeint, none_typeMaximum number of frames per chunk[optional]
start_frameintFirst frame index[optional]
stop_frameintLast frame index[optional]
frame_filterstrFrame 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_chunksboolWhen 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_idint, none_typeIf 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_cacheboolEnable 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_databoolCopy 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_methodStorageMethod[optional]
storageStorageType[optional]
sorting_methodSortingMethod[optional]
filename_patternstr, none_typeA 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_paramsDataRequestValidationParams[optional]

1.2.36 - DataRequestValidationParams class reference

Properties

NameTypeDescriptionNotes
modeValidationMode
frame_selection_methodFrameSelectionMethod
random_seedintThe 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_countintThe number of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method[optional]
frame_sharefloatThe share of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method[optional]
frames_per_job_countintThe 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_sharefloatThe 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]

1.2.37 - DataResponse class reference

Properties

NameTypeDescriptionNotes
rq_idstrRequest id[optional]

1.2.38 - DatasetFileRequest class reference

Properties

NameTypeDescriptionNotes
dataset_filefile_type

1.2.39 - DatasetFormat class reference

Properties

NameTypeDescriptionNotes
namestr
extstr
versionstr
enabledbool
dimensionstr

1.2.40 - DatasetFormats class reference

Properties

NameTypeDescriptionNotes
importers[DatasetFormat]
exporters[DatasetFormat]

1.2.41 - Event class reference

Properties

NameTypeDescriptionNotes
scopestr
timestampdatetime
obj_namestr, none_type[optional]
obj_idint, none_type[optional]
obj_valstr, none_type[optional]
sourcestr, none_type[optional]
countint, none_type[optional]
durationint[optional] if omitted the server will use the default value of 0
project_idint, none_type[optional]
task_idint, none_type[optional]
job_idint, none_type[optional]
user_idint, none_type[optional]
user_namestr, none_type[optional]
user_emailstr, none_type[optional]
org_idint, none_type[optional]
org_slugstr, none_type[optional]
payloadstr, none_type[optional]

1.2.42 - EventRequest class reference

Properties

NameTypeDescriptionNotes
scopestr
timestampdatetime
obj_namestr, none_type[optional]
obj_idint, none_type[optional]
obj_valstr, none_type[optional]
sourcestr, none_type[optional]
countint, none_type[optional]
durationint[optional] if omitted the server will use the default value of 0
project_idint, none_type[optional]
task_idint, none_type[optional]
job_idint, none_type[optional]
user_idint, none_type[optional]
user_namestr, none_type[optional]
user_emailstr, none_type[optional]
org_idint, none_type[optional]
org_slugstr, none_type[optional]
payloadstr, none_type[optional]

1.2.43 - Events class reference

Properties

NameTypeDescriptionNotes
webhook_typeWebhookType
events[EventsEnum]

1.2.44 - 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

NameTypeDescriptionNotes
valuestr*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:TASKmust 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”, ]

1.2.45 - FileInfo class reference

Properties

NameTypeDescriptionNotes
namestr
typeFileInfoTypeEnum
mime_typestr

1.2.46 - FileInfoTypeEnum class reference

  • `REG` - REG * `DIR` - DIR

Properties

NameTypeDescriptionNotes
valuestr*REG - REG *DIR - DIRmust be one of [“REG”, “DIR”, ]

1.2.47 - FrameMeta class reference

Properties

NameTypeDescriptionNotes
widthint
heightint
namestr
related_filesint
has_related_contextbool[optional] [readonly]

1.2.48 - FrameSelectionMethod class reference

  • `random_uniform` - RANDOM_UNIFORM * `random_per_job` - RANDOM_PER_JOB * `manual` - MANUAL

Properties

NameTypeDescriptionNotes
valuestr*random_uniform - RANDOM_UNIFORM *random_per_job - RANDOM_PER_JOB *manual - MANUALmust be one of [“random_uniform”, “random_per_job”, “manual”, ]

1.2.49 - FunctionCall class reference

Properties

NameTypeDescriptionNotes
idstrRequest id
functionFunctionCallParams
statusstr, none_type
enqueueddatetime, none_type
starteddatetime, none_type
endeddatetime, none_type
progressint, none_type[optional] if omitted the server will use the default value of 0
exc_infostr, none_type[optional]

1.2.50 - FunctionCallParams class reference

Properties

NameTypeDescriptionNotes
idstr, none_typeThe name of the function
taskint, none_typeThe id of the task
thresholdfloat, none_type
jobintThe id of the job[optional]

1.2.51 - FunctionCallRequest class reference

Properties

NameTypeDescriptionNotes
functionstrThe name of the function to execute
taskintThe id of the task to be annotated
jobintThe id of the job to be annotated[optional]
max_distanceint[optional]
thresholdfloat[optional]
cleanupboolWhether existing annotations should be removed[optional] if omitted the server will use the default value of False
conv_mask_to_polyboolDeprecated; use conv_mask_to_poly instead[optional]
conv_mask_to_polyboolConvert mask shapes to polygons[optional]
mapping{str: (LabelMappingEntryRequest,)}Label mapping from the model to the task labels[optional]

1.2.52 - InputTypeEnum class reference

  • `checkbox` - CHECKBOX * `radio` - RADIO * `number` - NUMBER * `text` - TEXT * `select` - SELECT

Properties

NameTypeDescriptionNotes
valuestr*checkbox - CHECKBOX *radio - RADIO *number - NUMBER *text - TEXT *select - SELECTmust be one of [“checkbox”, “radio”, “number”, “text”, “select”, ]

1.2.53 - InvitationRead class reference

Properties

NameTypeDescriptionNotes
ownerCloudStorageReadOwner
roleRoleEnum
userBasicUser
organizationint
organization_infoBasicOrganization
keystr[optional] [readonly]
created_datedatetime[optional] [readonly]
expiredbool, none_type[optional] [readonly]

1.2.54 - InvitationWriteRequest class reference

Properties

NameTypeDescriptionNotes
roleRoleEnum
emailstr

1.2.55 - IssueRead class reference

Properties

NameTypeDescriptionNotes
position[float]
commentsCommentsSummary
idint[optional] [readonly]
frameint[optional] [readonly]
jobint[optional] [readonly]
ownerCloudStorageReadOwner[optional]
assigneeCloudStorageReadOwner[optional]
created_datedatetime, none_type[optional] [readonly]
updated_datedatetime, none_type[optional] [readonly]
resolvedbool[optional] [readonly]

1.2.56 - IssuesSummary class reference

Properties

NameTypeDescriptionNotes
urlstr[optional] [readonly]
countint[optional] [readonly]

1.2.57 - IssueWriteRequest class reference

Properties

NameTypeDescriptionNotes
frameint
position[float]
jobint
messagestr
assigneeint, none_type[optional]
resolvedbool[optional]

1.2.58 - JobRead class reference

Properties

NameTypeDescriptionNotes
issuesIssuesSummary
labelsLabelsSummary
urlstr[optional] [readonly]
idint[optional] [readonly]
task_idint[optional] [readonly]
project_idint, none_type[optional] [readonly]
assigneeJobReadAssignee[optional]
guide_idint, none_type[optional] [readonly]
dimensionstr[optional] [readonly]
bug_trackerstr, none_type[optional] [readonly]
statusbool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
stagebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
statebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
modestr[optional] [readonly]
frame_countint[optional] [readonly]
start_frameint[optional] [readonly]
stop_frameint[optional] [readonly]
data_chunk_sizeint, none_type[optional] [readonly]
data_compressed_chunk_typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
data_original_chunk_typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
organizationint, none_type[optional] [readonly]
target_storageJobReadTargetStorage[optional]
source_storageJobReadTargetStorage[optional]
assignee_updated_datedatetime, none_type[optional] [readonly]
parent_job_idint, none_type[optional] [readonly]
consensus_replicasint[optional] [readonly]

1.2.59 - JobReadAssignee class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
urlstr[optional] [readonly]
idint[optional] [readonly]
first_namestr[optional]
last_namestr[optional]

1.2.60 - JobReadTargetStorage class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.61 - JobsSummary class reference

Properties

NameTypeDescriptionNotes
completedint, none_type
validationint, none_type
countint[optional] if omitted the server will use the default value of 0
urlstr[optional] [readonly]

1.2.62 - JobStage class reference

  • `annotation` - ANNOTATION * `validation` - VALIDATION * `acceptance` - ACCEPTANCE

Properties

NameTypeDescriptionNotes
valuestr*annotation - ANNOTATION *validation - VALIDATION *acceptance - ACCEPTANCEmust be one of [“annotation”, “validation”, “acceptance”, ]

1.2.63 - JobStatus class reference

  • `annotation` - ANNOTATION * `validation` - VALIDATION * `completed` - COMPLETED

Properties

NameTypeDescriptionNotes
valuestr*annotation - ANNOTATION *validation - VALIDATION *completed - COMPLETEDmust be one of [“annotation”, “validation”, “completed”, ]

1.2.64 - JobType class reference

  • `annotation` - ANNOTATION * `ground_truth` - GROUND_TRUTH * `consensus_replica` - CONSENSUS_REPLICA

Properties

NameTypeDescriptionNotes
valuestr*annotation - ANNOTATION *ground_truth - GROUND_TRUTH *consensus_replica - CONSENSUS_REPLICAmust be one of [“annotation”, “ground_truth”, “consensus_replica”, ]

1.2.65 - JobValidationLayoutRead class reference

Properties

NameTypeDescriptionNotes
honeypot_countint[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]

1.2.66 - JobWriteRequest class reference

Properties

NameTypeDescriptionNotes
typeJobType
task_idint
assigneeint, none_type[optional]
stageJobStage[optional]
stateOperationStatus[optional]
frame_selection_methodFrameSelectionMethod[optional]
frame_countintThe number of frames included in the GT job. Applicable only to the "random_uniform" frame selection method[optional]
frame_sharefloatThe share of frames included in the GT job. Applicable only to the "random_uniform" frame selection method[optional]
frames_per_job_countintThe 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_sharefloatThe share of frames included in the GT job from each annotation job. Applicable only to the "random_per_job" frame selection method[optional]
random_seedintThe 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]
seedintDeprecated. Use random_seed instead.[optional]
frames[int]The list of frame ids. Applicable only to the "manual" frame selection method[optional]

1.2.67 - Label class reference

Properties

NameTypeDescriptionNotes
namestr
idint[optional]
colorstrThe 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 []
typebool, date, datetime, dict, float, int, list, str, none_typeAssociated annotation type for this label *any - ANY *cuboid - CUBOID *ellipse - ELLIPSE *mask - MASK *points - POINTS *polygon - POLYGON *polyline - POLYLINE *rectangle - RECTANGLE *skeleton - SKELETON *tag - TAG[optional]
svgstr[optional]
sublabels**[Sublabel]**[optional]
project_idint, none_type[optional] [readonly]
task_idint, none_type[optional] [readonly]
parent_idint, none_type[optional] [readonly]
has_parentbool[optional] [readonly]

1.2.68 - LabeledData class reference

Properties

NameTypeDescriptionNotes
versionint[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 []

1.2.69 - LabeledDataRequest class reference

Properties

NameTypeDescriptionNotes
versionint[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 []

1.2.70 - LabeledImage class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.71 - LabeledImageRequest class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.72 - LabeledShape class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
label_idint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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]

1.2.73 - LabeledShapeRequest class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
label_idint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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]

1.2.74 - LabeledTrack class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
shapes[TrackedShape]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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]

1.2.75 - LabeledTrackRequest class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
shapes[TrackedShapeRequest]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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]

1.2.76 - LabelMappingEntryRequest class reference

Properties

NameTypeDescriptionNotes
namestr
attributes{str: (str,)}[optional]
sublabels{str: (SublabelMappingEntryRequest,)}Label mapping for from the model to the task sublabels within a parent label[optional]

1.2.77 - LabelsSummary class reference

Properties

NameTypeDescriptionNotes
urlstr[optional] [readonly]

1.2.78 - LabelType class reference

  • `any` - ANY * `cuboid` - CUBOID * `ellipse` - ELLIPSE * `mask` - MASK * `points` - POINTS * `polygon` - POLYGON * `polyline` - POLYLINE * `rectangle` - RECTANGLE * `skeleton` - SKELETON * `tag` - TAG

Properties

NameTypeDescriptionNotes
valuestr*any - ANY *cuboid - CUBOID *ellipse - ELLIPSE *mask - MASK *points - POINTS *polygon - POLYGON *polyline - POLYLINE *rectangle - RECTANGLE *skeleton - SKELETON *tag - TAGmust be one of [“any”, “cuboid”, “ellipse”, “mask”, “points”, “polygon”, “polyline”, “rectangle”, “skeleton”, “tag”, ]

1.2.79 - LocationEnum class reference

  • `cloud_storage` - CLOUD_STORAGE * `local` - LOCAL

Properties

NameTypeDescriptionNotes
valuestr*cloud_storage - CLOUD_STORAGE *local - LOCALmust be one of [“cloud_storage”, “local”, ]

1.2.80 - LoginSerializerExRequest class reference

Properties

NameTypeDescriptionNotes
passwordstr
usernamestr[optional]
emailstr[optional]

1.2.81 - MembershipRead class reference

Properties

NameTypeDescriptionNotes
userBasicUser
idint[optional] [readonly]
organizationint[optional] [readonly]
is_activebool[optional] [readonly]
joined_datedatetime, none_type[optional] [readonly]
rolebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
invitationstr, none_type[optional] [readonly]

1.2.82 - MetaUser class reference

Properties

NameTypeDescriptionNotes
urlstr[optional] [readonly]
idint[optional] [readonly]
first_namestr[optional]
last_namestr[optional]
emailstr[optional]
is_staffboolDesignates whether the user can log into this admin site.[optional]
is_superuserboolDesignates that this user has all permissions without explicitly assigning them.[optional]
is_activeboolDesignates whether this user should be treated as active. Unselect this instead of deleting accounts.[optional]
last_logindatetime, none_type[optional] [readonly]
date_joineddatetime[optional] [readonly]
has_analytics_accessbool[optional] [readonly]
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.[optional]
groups[str][optional]

1.2.83 - NullEnum class reference

Properties

NameTypeDescriptionNotes
valuestrmust be one of [“null”, ]

1.2.84 - OnlineFunctionCallRequest class reference

Properties

NameTypeDescriptionNotes
jobint[optional]
taskint[optional]

1.2.85 - OperationStatus class reference

  • `new` - NEW * `in progress` - IN_PROGRESS * `completed` - COMPLETED * `rejected` - REJECTED

Properties

NameTypeDescriptionNotes
valuestr*new - NEW *in progress - IN_PROGRESS *completed - COMPLETED *rejected - REJECTEDmust be one of [“new”, “in progress”, “completed”, “rejected”, ]

1.2.86 - OrganizationRead class reference

Properties

NameTypeDescriptionNotes
ownerCloudStorageReadOwner
idint[optional] [readonly]
slugstr[optional] [readonly]
namestr[optional] [readonly]
descriptionstr[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
contact{str: (bool, date, datetime, dict, float, int, list, str, none_type)}[optional] [readonly]

1.2.87 - OrganizationWriteRequest class reference

Properties

NameTypeDescriptionNotes
slugstr
namestr[optional]
descriptionstr[optional]
contact{str: (bool, date, datetime, dict, float, int, list, str, none_type)}[optional]

1.2.88 - PaginatedAnnotationConflictList class reference

Properties

NameTypeDescriptionNotes
countint
results[AnnotationConflict]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.89 - PaginatedCloudStorageReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[CloudStorageRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.90 - PaginatedCommentReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[CommentRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.91 - PaginatedConsensusSettingsList class reference

Properties

NameTypeDescriptionNotes
countint
results[ConsensusSettings]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.92 - PaginatedInvitationReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[InvitationRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.93 - PaginatedIssueReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[IssueRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.94 - PaginatedJobReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[JobRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.95 - PaginatedLabelList class reference

Properties

NameTypeDescriptionNotes
countint
results[Label]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.96 - PaginatedMembershipReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[MembershipRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.97 - PaginatedMetaUserList class reference

Properties

NameTypeDescriptionNotes
countint
results[MetaUser]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.98 - PaginatedOrganizationReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[OrganizationRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.99 - PaginatedProjectReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[ProjectRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.100 - PaginatedQualityReportList class reference

Properties

NameTypeDescriptionNotes
countint
results[QualityReport]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.101 - PaginatedQualitySettingsList class reference

Properties

NameTypeDescriptionNotes
countint
results[QualitySettings]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.102 - PaginatedRequestList class reference

Properties

NameTypeDescriptionNotes
countint
results[Request]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.103 - PaginatedTaskReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[TaskRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.104 - PaginatedWebhookDeliveryReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[WebhookDeliveryRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.105 - PaginatedWebhookReadList class reference

Properties

NameTypeDescriptionNotes
countint
results[WebhookRead]
nextstr, none_type[optional]
previousstr, none_type[optional]

1.2.106 - PasswordChangeRequest class reference

Properties

NameTypeDescriptionNotes
old_passwordstr
new_password1str
new_password2str

1.2.107 - PasswordResetConfirmRequest class reference

Serializer for confirming a password reset attempt.

Properties

NameTypeDescriptionNotes
new_password1str
new_password2str
uidstr
tokenstr

1.2.108 - PasswordResetSerializerExRequest class reference

Serializer for requesting a password reset e-mail.

Properties

NameTypeDescriptionNotes
emailstr

1.2.109 - PatchedAnnotationGuideWriteRequest class reference

Properties

NameTypeDescriptionNotes
task_idint, none_type[optional]
project_idint, none_type[optional]
markdownstr[optional]

1.2.110 - PatchedCloudStorageWriteRequest class reference

Properties

NameTypeDescriptionNotes
provider_typeProviderTypeEnum[optional]
resourcestr[optional]
display_namestr[optional]
ownerBasicUserRequest[optional]
credentials_typeCredentialsTypeEnum[optional]
session_tokenstr[optional]
account_namestr[optional]
keystr[optional]
secret_keystr[optional]
connection_stringstr[optional]
key_filefile_type[optional]
specific_attributesstr[optional]
descriptionstr[optional]
manifests[str][optional] if omitted the server will use the default value of []

1.2.111 - PatchedCommentWriteRequest class reference

Properties

NameTypeDescriptionNotes
messagestr[optional]

1.2.112 - PatchedConsensusSettingsRequest class reference

Properties

NameTypeDescriptionNotes
iou_thresholdfloatPairwise annotation matching IoU threshold[optional]
quorumfloatMinimum required share of sources having an annotation for it to be accepted[optional]

1.2.113 - PatchedDataMetaWriteRequest class reference

Properties

NameTypeDescriptionNotes
deleted_frames[int][optional]

1.2.114 - PatchedInvitationWriteRequest class reference

Properties

NameTypeDescriptionNotes
roleRoleEnum[optional]
emailstr[optional]

1.2.115 - PatchedIssueWriteRequest class reference

Properties

NameTypeDescriptionNotes
position[float][optional]
assigneeint, none_type[optional]
resolvedbool[optional]

1.2.116 - PatchedJobDataMetaWriteRequest class reference

Properties

NameTypeDescriptionNotes
deleted_frames[int][optional]

1.2.117 - PatchedJobValidationLayoutWriteRequest class reference

Properties

NameTypeDescriptionNotes
frame_selection_methodbool, date, datetime, dict, float, int, list, str, none_typeThe 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]

1.2.118 - PatchedJobWriteRequest class reference

Properties

NameTypeDescriptionNotes
assigneeint, none_type[optional]
stageJobStage[optional]
stateOperationStatus[optional]

1.2.119 - PatchedLabeledDataRequest class reference

Properties

NameTypeDescriptionNotes
versionint[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 []

1.2.120 - PatchedLabelRequest class reference

Properties

NameTypeDescriptionNotes
idint[optional]
namestr[optional]
colorstrThe 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 []
deletedboolDelete the label. Only applicable in the PATCH methods of a project or a task.[optional]
typebool, date, datetime, dict, float, int, list, str, none_typeAssociated annotation type for this label *any - ANY *cuboid - CUBOID *ellipse - ELLIPSE *mask - MASK *points - POINTS *polygon - POLYGON *polyline - POLYLINE *rectangle - RECTANGLE *skeleton - SKELETON *tag - TAG[optional]
svgstr[optional]
sublabels**[SublabelRequest]**[optional]

1.2.121 - PatchedMembershipWriteRequest class reference

Properties

NameTypeDescriptionNotes
roleRoleEnum[optional]

1.2.122 - PatchedOrganizationWriteRequest class reference

Properties

NameTypeDescriptionNotes
slugstr[optional]
namestr[optional]
descriptionstr[optional]
contact{str: (bool, date, datetime, dict, float, int, list, str, none_type)}[optional]

1.2.123 - PatchedProjectWriteRequest class reference

Properties

NameTypeDescriptionNotes
namestr[optional]
labels[PatchedLabelRequest][optional] if omitted the server will use the default value of []
owner_idint, none_type[optional]
assignee_idint, none_type[optional]
bug_trackerstr[optional]
target_storagePatchedProjectWriteRequestTargetStorage[optional]
source_storagePatchedProjectWriteRequestTargetStorage[optional]

1.2.124 - PatchedProjectWriteRequestTargetStorage class reference

Properties

NameTypeDescriptionNotes
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.125 - PatchedQualitySettingsRequest class reference

Properties

NameTypeDescriptionNotes
job_filterstrA JSON-based logic expression used to filter jobs for quality validation. The filter supports various terms to specify conditions on job: [‘assignee’, ‘id’, ‘stage’, ‘state’, ’task_id’, ’task_name’, ’type’][optional]
inheritboolAllow using project settings when computing task quality. Only applicable to task quality settings inside projects[optional]
target_metricbool, date, datetime, dict, float, int, list, str, none_typeThe primary metric used for quality estimation *accuracy - ACCURACY *precision - PRECISION *recall - RECALL[optional]
target_metric_thresholdfloatDefines the minimal quality requirements in terms of the selected target metric.[optional]
max_validations_per_jobintThe 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_thresholdfloatUsed for distinction between matched / unmatched shapes[optional] if omitted the server will use the default value of 0.4
oks_sigmafloatLike 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] if omitted the server will use the default value of 0.09
point_size_basebool, date, datetime, dict, float, int, list, str, none_typeWhen 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_thicknessfloatThickness 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] if omitted the server will use the default value of 0.01
low_overlap_thresholdfloatUsed for distinction between strong / weak (low_overlap) matches[optional] if omitted the server will use the default value of 0.8
compare_line_orientationboolEnables or disables polyline orientation comparison[optional] if omitted the server will use the default value of True
line_orientation_thresholdfloatThe 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] if omitted the server will use the default value of 0.1
compare_groupsboolEnables or disables annotation group checks[optional] if omitted the server will use the default value of True
group_match_thresholdfloatMinimal IoU for groups to be considered matching. Only used when the ‘compare_groups’ parameter is true[optional] if omitted the server will use the default value of 0.5
check_covered_annotationsboolCheck for partially-covered annotations, useful in segmentation tasks[optional] if omitted the server will use the default value of True
object_visibility_thresholdfloatMinimal visible area percent of the spatial annotations (polygons, masks) for reporting covered annotations. Only used when the ‘object_visibility_threshold’ parameter is true[optional] if omitted the server will use the default value of 0.05
panoptic_comparisonboolUse only the visible part of the masks and polygons in comparisons[optional] if omitted the server will use the default value of True
compare_attributesboolEnables or disables annotation attribute comparison[optional] if omitted the server will use the default value of True
empty_is_annotatedboolConsider empty frames annotated as "empty". 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

1.2.126 - PatchedTaskValidationLayoutWriteRequest class reference

Properties

NameTypeDescriptionNotes
disabled_frames[int]The list of frame ids to be excluded from validation[optional]
frame_selection_methodbool, date, datetime, dict, float, int, list, str, none_typeThe 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]

1.2.127 - PatchedTaskWriteRequest class reference

Properties

NameTypeDescriptionNotes
namestr[optional]
project_idint, none_type[optional]
owner_idint, none_type[optional]
assignee_idint, none_type[optional]
bug_trackerstr[optional]
labels[PatchedLabelRequest][optional]
subsetstr[optional]
target_storagePatchedTaskWriteRequestTargetStorage[optional]
source_storagePatchedTaskWriteRequestTargetStorage[optional]

1.2.128 - PatchedTaskWriteRequestTargetStorage class reference

Properties

NameTypeDescriptionNotes
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.129 - PatchedUserRequest class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.[optional]
first_namestr[optional]
last_namestr[optional]
emailstr[optional]
groups[str][optional]
is_staffboolDesignates whether the user can log into this admin site.[optional]
is_superuserboolDesignates that this user has all permissions without explicitly assigning them.[optional]
is_activeboolDesignates whether this user should be treated as active. Unselect this instead of deleting accounts.[optional]

1.2.130 - PatchedWebhookWriteRequest class reference

Properties

NameTypeDescriptionNotes
target_urlstr[optional]
descriptionstr[optional]
content_typeWebhookContentType[optional]
secretstr[optional]
is_activebool[optional]
enable_sslbool[optional]
events[EventsEnum][optional]

1.2.131 - Plugins class reference

Properties

NameTypeDescriptionNotes
git_integrationbool
analyticsbool
modelsbool
predictbool

1.2.132 - ProjectFileRequest class reference

Properties

NameTypeDescriptionNotes
project_filefile_type

1.2.133 - ProjectRead class reference

Properties

NameTypeDescriptionNotes
tasksTasksSummary
labelsLabelsSummary
urlstr[optional] [readonly]
idint[optional] [readonly]
namestr[optional] [readonly]
ownerJobReadAssignee[optional]
assigneeJobReadAssignee[optional]
guide_idint, none_type[optional]
bug_trackerstr[optional] [readonly]
task_subsets[str][optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
statusbool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
dimensionstr, none_type[optional] [readonly]
organizationint, none_type[optional] [readonly]
target_storageProjectReadTargetStorage[optional]
source_storageProjectReadTargetStorage[optional]
assignee_updated_datedatetime, none_type[optional] [readonly]

1.2.134 - ProjectReadTargetStorage class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.135 - ProjectWriteRequest class reference

Properties

NameTypeDescriptionNotes
namestr
labels[PatchedLabelRequest][optional] if omitted the server will use the default value of []
owner_idint, none_type[optional]
assignee_idint, none_type[optional]
bug_trackerstr[optional]
target_storagePatchedProjectWriteRequestTargetStorage[optional]
source_storagePatchedProjectWriteRequestTargetStorage[optional]

1.2.136 - ProviderTypeEnum class reference

  • `AWS_S3_BUCKET` - AWS_S3 * `AZURE_CONTAINER` - AZURE_CONTAINER * `GOOGLE_DRIVE` - GOOGLE_DRIVE * `GOOGLE_CLOUD_STORAGE` - GOOGLE_CLOUD_STORAGE

Properties

NameTypeDescriptionNotes
valuestr*AWS_S3_BUCKET - AWS_S3 *AZURE_CONTAINER - AZURE_CONTAINER *GOOGLE_DRIVE - GOOGLE_DRIVE *GOOGLE_CLOUD_STORAGE - GOOGLE_CLOUD_STORAGEmust be one of [“AWS_S3_BUCKET”, “AZURE_CONTAINER”, “GOOGLE_DRIVE”, “GOOGLE_CLOUD_STORAGE”, ]

1.2.137 - QualityPointSizeBase class reference

  • `image_size` - IMAGE_SIZE * `group_bbox_size` - GROUP_BBOX_SIZE

Properties

NameTypeDescriptionNotes
valuestr*image_size - IMAGE_SIZE *group_bbox_size - GROUP_BBOX_SIZEmust be one of [“image_size”, “group_bbox_size”, ]

1.2.138 - QualityReport class reference

Properties

NameTypeDescriptionNotes
targetQualityReportTarget
summaryQualityReportSummary
idint[optional] [readonly]
job_idint, none_type[optional] [readonly]
task_idint, none_type[optional] [readonly]
project_idint, none_type[optional] [readonly]
parent_idint, none_type[optional] [readonly]
created_datedatetime[optional] [readonly]
target_last_updateddatetime[optional] [readonly]
gt_last_updateddatetime, none_type[optional] [readonly]
assigneeJobReadAssignee[optional]

1.2.139 - QualityReportCreateRequest class reference

Properties

NameTypeDescriptionNotes
task_idint[optional]
project_idint[optional]

1.2.140 - QualityReportJobsSummary class reference

Properties

NameTypeDescriptionNotes
totalintNon-GT jobs in included tasks
excludedintJobs excluded by filters
not_checkableintIncluded jobs without validation frames
includedintIncluded job count = total - excluded

1.2.141 - QualityReportSummary class reference

Properties

NameTypeDescriptionNotes
total_framesint
validation_framesint
validation_frame_sharefloat
conflict_countint
warning_countint
error_countint
conflicts_by_type{str: (int,)}
valid_countint
ds_countint
gt_countint
total_countint
accuracyfloat
precisionfloat
recallfloat
frame_countintDeprecated. Use ‘validation_frames’ instead[optional]
frame_sharefloatDeprecated. Use ‘validation_frame_share’ instead[optional]
tasksQualityReportSummaryTasks[optional]
jobsQualityReportSummaryJobs[optional]

1.2.142 - QualityReportSummaryJobs class reference

Included only in task and project reports

Properties

NameTypeDescriptionNotes
totalintNon-GT jobs in included tasks
excludedintJobs excluded by filters
not_checkableintIncluded jobs without validation frames
includedintIncluded job count = total - excluded

1.2.143 - QualityReportSummaryTasks class reference

Included only in project reports

Properties

NameTypeDescriptionNotes
totalintTotal task count
customintTasks with individual settings
not_configuredintTasks with validation not configured
excludedintTasks excluded by filters
includedintIncluded task count = total - custom - non_configured - excluded

1.2.144 - QualityReportTarget class reference

  • `job` - JOB * `task` - TASK * `project` - PROJECT

Properties

NameTypeDescriptionNotes
valuestr*job - JOB *task - TASK *project - PROJECTmust be one of [“job”, “task”, “project”, ]

1.2.145 - QualityReportTasksSummary class reference

Properties

NameTypeDescriptionNotes
totalintTotal task count
customintTasks with individual settings
not_configuredintTasks with validation not configured
excludedintTasks excluded by filters
includedintIncluded task count = total - custom - non_configured - excluded

1.2.146 - QualitySettings class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
task_idint, none_type[optional]
project_idint, none_type[optional]
job_filterstrA JSON-based logic expression used to filter jobs for quality validation. The filter supports various terms to specify conditions on job: [‘assignee’, ‘id’, ‘stage’, ‘state’, ’task_id’, ’task_name’, ’type’][optional]
inheritboolAllow using project settings when computing task quality. Only applicable to task quality settings inside projects[optional]
target_metricbool, date, datetime, dict, float, int, list, str, none_typeThe primary metric used for quality estimation *accuracy - ACCURACY *precision - PRECISION *recall - RECALL[optional]
target_metric_thresholdfloatDefines the minimal quality requirements in terms of the selected target metric.[optional]
max_validations_per_jobintThe 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_thresholdfloatUsed for distinction between matched / unmatched shapes[optional] if omitted the server will use the default value of 0.4
oks_sigmafloatLike 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] if omitted the server will use the default value of 0.09
point_size_basebool, date, datetime, dict, float, int, list, str, none_typeWhen 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_thicknessfloatThickness 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] if omitted the server will use the default value of 0.01
low_overlap_thresholdfloatUsed for distinction between strong / weak (low_overlap) matches[optional] if omitted the server will use the default value of 0.8
compare_line_orientationboolEnables or disables polyline orientation comparison[optional] if omitted the server will use the default value of True
line_orientation_thresholdfloatThe 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] if omitted the server will use the default value of 0.1
compare_groupsboolEnables or disables annotation group checks[optional] if omitted the server will use the default value of True
group_match_thresholdfloatMinimal IoU for groups to be considered matching. Only used when the ‘compare_groups’ parameter is true[optional] if omitted the server will use the default value of 0.5
check_covered_annotationsboolCheck for partially-covered annotations, useful in segmentation tasks[optional] if omitted the server will use the default value of True
object_visibility_thresholdfloatMinimal visible area percent of the spatial annotations (polygons, masks) for reporting covered annotations. Only used when the ‘object_visibility_threshold’ parameter is true[optional] if omitted the server will use the default value of 0.05
panoptic_comparisonboolUse only the visible part of the masks and polygons in comparisons[optional] if omitted the server will use the default value of True
compare_attributesboolEnables or disables annotation attribute comparison[optional] if omitted the server will use the default value of True
empty_is_annotatedboolConsider empty frames annotated as "empty". 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
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]

1.2.147 - QualityTargetMetric class reference

  • `accuracy` - ACCURACY * `precision` - PRECISION * `recall` - RECALL

Properties

NameTypeDescriptionNotes
valuestr*accuracy - ACCURACY *precision - PRECISION *recall - RECALLmust be one of [“accuracy”, “precision”, “recall”, ]

1.2.148 - RegisterSerializerEx class reference

Properties

NameTypeDescriptionNotes
usernamestr
emailstr[optional]
first_namestr[optional]
last_namestr[optional]
email_verification_requiredbool[optional] [readonly]
keystr, none_type[optional] [readonly]

1.2.149 - RegisterSerializerExRequest class reference

Properties

NameTypeDescriptionNotes
usernamestr
password1str
password2str
emailstr[optional]
first_namestr[optional]
last_namestr[optional]

1.2.150 - Request class reference

Properties

NameTypeDescriptionNotes
statusRequestStatus
idstr
operationRequestDataOperation
created_datedatetime
messagestr[optional] [readonly]
progressfloat, none_type[optional] [readonly]
started_datedatetime, none_type[optional]
finished_datedatetime, none_type[optional]
expiry_datedatetime, none_type[optional] [readonly]
ownerRequestOwner[optional]
result_urlstr, none_type[optional]
result_idint, none_type[optional]

1.2.151 - RequestDataOperation class reference

Properties

NameTypeDescriptionNotes
typestr
targetstr
project_idint, none_type[optional]
task_idint, none_type[optional]
job_idint, none_type[optional]
formatstr, none_type[optional]
function_idstr, none_type[optional]

1.2.152 - RequestOwner class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
idint[optional] [readonly]

1.2.153 - RequestStatus class reference

  • `queued` - Queued * `started` - Started * `failed` - Failed * `finished` - Finished

Properties

NameTypeDescriptionNotes
valuestr*queued - Queued *started - Started *failed - Failed *finished - Finishedmust be one of [“queued”, “started”, “failed”, “finished”, ]

1.2.154 - RestAuthDetail class reference

Properties

NameTypeDescriptionNotes
detailstr[optional] [readonly]

1.2.155 - RoleEnum class reference

  • `worker` - Worker * `supervisor` - Supervisor * `maintainer` - Maintainer * `owner` - Owner

Properties

NameTypeDescriptionNotes
valuestr*worker - Worker *supervisor - Supervisor *maintainer - Maintainer *owner - Ownermust be one of [“worker”, “supervisor”, “maintainer”, “owner”, ]

1.2.156 - RqId class reference

Properties

NameTypeDescriptionNotes
rq_idstrRequest id

1.2.157 - RqStatus class reference

Properties

NameTypeDescriptionNotes
stateRqStatusStateEnum
messagestr[optional] if omitted the server will use the default value of ""
progressfloat[optional] if omitted the server will use the default value of 0.0

1.2.158 - RqStatusStateEnum class reference

  • `Queued` - Queued * `Started` - Started * `Finished` - Finished * `Failed` - Failed

Properties

NameTypeDescriptionNotes
valuestr*Queued - Queued *Started - Started *Finished - Finished *Failed - Failedmust be one of [“Queued”, “Started”, “Finished”, “Failed”, ]

1.2.159 - ShapeType class reference

  • `rectangle` - RECTANGLE * `polygon` - POLYGON * `polyline` - POLYLINE * `points` - POINTS * `ellipse` - ELLIPSE * `cuboid` - CUBOID * `mask` - MASK * `skeleton` - SKELETON

Properties

NameTypeDescriptionNotes
valuestr*rectangle - RECTANGLE *polygon - POLYGON *polyline - POLYLINE *points - POINTS *ellipse - ELLIPSE *cuboid - CUBOID *mask - MASK *skeleton - SKELETONmust be one of [“rectangle”, “polygon”, “polyline”, “points”, “ellipse”, “cuboid”, “mask”, “skeleton”, ]

1.2.160 - SigningRequest class reference

Properties

NameTypeDescriptionNotes
urlstr

1.2.161 - SortingMethod class reference

  • `lexicographical` - LEXICOGRAPHICAL * `natural` - NATURAL * `predefined` - PREDEFINED * `random` - RANDOM

Properties

NameTypeDescriptionNotes
valuestr*lexicographical - LEXICOGRAPHICAL *natural - NATURAL *predefined - PREDEFINED *random - RANDOMmust be one of [“lexicographical”, “natural”, “predefined”, “random”, ]

1.2.162 - Storage class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.163 - StorageMethod class reference

  • `cache` - CACHE * `file_system` - FILE_SYSTEM

Properties

NameTypeDescriptionNotes
valuestr*cache - CACHE *file_system - FILE_SYSTEMmust be one of [“cache”, “file_system”, ]

1.2.164 - StorageRequest class reference

Properties

NameTypeDescriptionNotes
locationLocationEnum[optional]
cloud_storage_idint, none_type[optional]

1.2.165 - StorageType class reference

  • `cloud_storage` - CLOUD_STORAGE * `local` - LOCAL * `share` - SHARE

Properties

NameTypeDescriptionNotes
valuestr*cloud_storage - CLOUD_STORAGE *local - LOCAL *share - SHAREmust be one of [“cloud_storage”, “local”, “share”, ]

1.2.166 - Sublabel class reference

Properties

NameTypeDescriptionNotes
namestr
idint[optional]
colorstrThe 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 []
typebool, date, datetime, dict, float, int, list, str, none_typeAssociated annotation type for this label *any - ANY *cuboid - CUBOID *ellipse - ELLIPSE *mask - MASK *points - POINTS *polygon - POLYGON *polyline - POLYLINE *rectangle - RECTANGLE *skeleton - SKELETON *tag - TAG[optional]
has_parentbool[optional]

1.2.167 - SubLabeledShape class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
label_idint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.168 - SubLabeledShapeRequest class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
label_idint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.169 - SubLabeledTrack class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
shapes[TrackedShape]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.170 - SubLabeledTrackRequest class reference

Properties

NameTypeDescriptionNotes
frameint
label_idint
shapes[TrackedShapeRequest]
idint, none_type[optional]
groupint, none_type[optional]
sourcestr[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 []

1.2.171 - SublabelMappingEntryRequest class reference

Properties

NameTypeDescriptionNotes
namestr
attributes{str: (str,)}[optional]

1.2.172 - SublabelRequest class reference

Properties

NameTypeDescriptionNotes
namestr
idint[optional]
colorstrThe 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 []
typebool, date, datetime, dict, float, int, list, str, none_typeAssociated annotation type for this label *any - ANY *cuboid - CUBOID *ellipse - ELLIPSE *mask - MASK *points - POINTS *polygon - POLYGON *polyline - POLYLINE *rectangle - RECTANGLE *skeleton - SKELETON *tag - TAG[optional]
has_parentbool[optional]

1.2.173 - TaskFileRequest class reference

Properties

NameTypeDescriptionNotes
task_filefile_type

1.2.174 - TaskRead class reference

Properties

NameTypeDescriptionNotes
jobsJobsSummary
labelsLabelsSummary
urlstr[optional] [readonly]
idint[optional] [readonly]
namestr[optional] [readonly]
project_idint, none_type[optional]
modestr[optional] [readonly]
ownerCloudStorageReadOwner[optional]
assigneeCloudStorageReadOwner[optional]
bug_trackerstr[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
overlapint, none_type[optional] [readonly]
segment_sizeint[optional] [readonly]
statusbool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
data_chunk_sizeint, none_type[optional] [readonly]
data_compressed_chunk_typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
guide_idint, none_type[optional]
data_original_chunk_typebool, date, datetime, dict, float, int, list, str, none_type[optional] [readonly]
sizeint[optional] [readonly]
image_qualityint[optional] [readonly]
dataint[optional] [readonly]
dimensionstr[optional]
subsetstr[optional] [readonly]
organizationint, none_type[optional] [readonly]
target_storageJobReadTargetStorage[optional]
source_storageJobReadTargetStorage[optional]
assignee_updated_datedatetime, none_type[optional] [readonly]
validation_modestr, none_typeDescribes how the task validation is performed. Configured at task creation[optional]
consensus_enabledbool[optional] [readonly]

1.2.175 - TasksSummary class reference

Properties

NameTypeDescriptionNotes
countint[optional] if omitted the server will use the default value of 0
urlstr[optional] [readonly]

1.2.176 - TaskValidationLayoutRead class reference

Properties

NameTypeDescriptionNotes
modeTaskValidationLayoutReadMode[optional]
frames_per_job_countint, 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_countint[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]

1.2.177 - TaskValidationLayoutReadMode class reference

Properties

NameTypeDescriptionNotes

1.2.178 - TaskWriteRequest class reference

Properties

NameTypeDescriptionNotes
namestr
project_idint, none_type[optional]
owner_idint, none_type[optional]
assignee_idint, none_type[optional]
bug_trackerstr[optional]
overlapint, none_type[optional]
segment_sizeint[optional]
labels[PatchedLabelRequest][optional]
subsetstr[optional]
target_storagePatchedTaskWriteRequestTargetStorage[optional]
source_storagePatchedTaskWriteRequestTargetStorage[optional]
consensus_replicasintThe number of consensus replica jobs for each annotation job. Configured at task creation[optional] if omitted the server will use the default value of 0

1.2.179 - Token class reference

Serializer for Token model.

Properties

NameTypeDescriptionNotes
keystr

1.2.180 - TrackedShape class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
attributes[AttributeVal][optional] if omitted the server will use the default value of []

1.2.181 - TrackedShapeRequest class reference

Properties

NameTypeDescriptionNotes
typeShapeType
frameint
occludedbool[optional] if omitted the server will use the default value of False
outsidebool[optional] if omitted the server will use the default value of False
z_orderint[optional] if omitted the server will use the default value of 0
rotationfloat[optional] if omitted the server will use the default value of 0.0
points[float][optional]
idint, none_type[optional]
attributes[AttributeValRequest][optional] if omitted the server will use the default value of []

1.2.182 - User class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
groups[str]
urlstr[optional] [readonly]
idint[optional] [readonly]
first_namestr[optional]
last_namestr[optional]
emailstr[optional]
is_staffboolDesignates whether the user can log into this admin site.[optional]
is_superuserboolDesignates that this user has all permissions without explicitly assigning them.[optional]
is_activeboolDesignates whether this user should be treated as active. Unselect this instead of deleting accounts.[optional]
last_logindatetime, none_type[optional] [readonly]
date_joineddatetime[optional] [readonly]
has_analytics_accessbool[optional] [readonly]

1.2.183 - UserIdentifiers class reference

Properties

NameTypeDescriptionNotes
usernamestrRequired. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
idint[optional] [readonly]

1.2.184 - ValidationMode class reference

  • `gt` - GT * `gt_pool` - GT_POOL

Properties

NameTypeDescriptionNotes
valuestr*gt - GT *gt_pool - GT_POOLmust be one of [“gt”, “gt_pool”, ]

1.2.185 - ValidationParamsRequest class reference

Properties

NameTypeDescriptionNotes
modeValidationMode
frame_selection_methodFrameSelectionMethod
random_seedintThe 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_countintThe number of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method[optional]
frame_sharefloatThe share of frames to be included in the validation set. Applicable only to the "random_uniform" frame selection method[optional]
frames_per_job_countintThe 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_sharefloatThe 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]

1.2.186 - WebhookContentType class reference

  • `application/json` - JSON

Properties

NameTypeDescriptionNotes
valuestr*application/json - JSONdefaults to “application/json”, must be one of [“application/json”, ]

1.2.187 - WebhookDeliveryRead class reference

Properties

NameTypeDescriptionNotes
idint[optional] [readonly]
webhook_idint[optional] [readonly]
eventstr[optional] [readonly]
status_codeint, none_type[optional] [readonly]
redeliverybool[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
changed_fieldsstr[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]

1.2.188 - WebhookRead class reference

Properties

NameTypeDescriptionNotes
typeWebhookType
content_typeWebhookContentType
idint[optional] [readonly]
urlstr[optional] [readonly]
target_urlstr[optional] [readonly]
descriptionstr[optional] [readonly]
is_activebool[optional] [readonly]
enable_sslbool[optional] [readonly]
created_datedatetime[optional] [readonly]
updated_datedatetime[optional] [readonly]
ownerJobReadAssignee[optional]
project_idint, none_type[optional]
organizationint, none_type[optional] [readonly]
events[EventsEnum][optional] [readonly]
last_statusint[optional] [readonly]
last_delivery_datedatetime[optional] [readonly]

1.2.189 - WebhookType class reference

  • `organization` - ORGANIZATION * `project` - PROJECT

Properties

NameTypeDescriptionNotes
valuestr*organization - ORGANIZATION *project - PROJECTmust be one of [“organization”, “project”, ]

1.2.190 - WebhookWriteRequest class reference

Properties

NameTypeDescriptionNotes
target_urlstr
typeWebhookType
events[EventsEnum]
descriptionstr[optional]
content_typeWebhookContentType[optional]
secretstr[optional]
is_activebool[optional]
enable_sslbool[optional]
project_idint, none_type[optional]

2 - Low-level API

Overview

The low-level API is useful if you need to work directly with REST API, but wantto have data validation and syntax assistance from your code editor. The codeon this layer is autogenerated.

Code of this component is located incvat_sdk.api_client.

Example

Let’s see how a task with local files can be created. We will use the basic authto make things simpler.

fromtimeimportsleepfromcvat_sdk.api_clientimportConfiguration,ApiClient,models,apis,exceptionsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)# Enter a context with an instance of the API clientwithApiClient(configuration)asapi_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.ITaskWriteRequesttask_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)exceptexceptions.ApiExceptionase:# We can catch the basic exception type, or a derived typeprint("Exception when trying to create a task:%s\n"%e)# Here we will use models instead of a dicttask_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)assertresponse.status==202,response.msg# Wait till task data is processedfor_inrange(100):request_details,response=api_client.requests_api.retrieve(result.rq_id)status,message=request_details.status,request_details.messageifstatus.valuein{'finished','failed'}:breaksleep(0.1)assertstatus.value=='finished',status.message# Update the task object and check the task size(task,_)=api_client.tasks_api.retrieve(task.id)asserttask.size==4

ApiClient and configuration

The starting point in the low-level API is thecvat_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 ofApiClient, you need to set up acvat_sdk.api_client.Configurationobject and pass it to theApiClient class constructor. Additional connection-specificoptions, such as extra headers and cookies can be specified in the class constructor.ApiClient implements the context manager protocol. Typically, you createApiClient this way:

fromcvat_sdk.api_clientimportApiClient,Configurationconfiguration=Configuration(host="http://localhost")withApiClient(configuration)asapi_client:...

After creating anApiClient instance, you can send requests to various server endpointsvia*_api member properties and directly, using therest_client member.Read more about API wrappers below.

Typically, the first thing you do withApiClient is log in.Read more about authentication options below.

Authentication

CVAT supports 3 authentication options:

  • Basic authentication, with a username and a password
  • Session authentication, with a session ID and a CSRF token
  • Token authentication, with an API key (deprecated)

Token authentication requires an API key, which can be obtained after logging invia the/api/auth/login endpoint using the basic authentication credentials.

Session authentication requires a session ID and a CSRF token, which can be obtained afterlogging in via the/api/auth/login endpoint using the basic authentication credentials.

Authentication credentials for anApiClient instance can be specified in aConfiguration object:

configuration=Configuration(username='YOUR_USERNAME',password='YOUR_PASSWORD',...)withApiClient(configuration)asapi_client:...
configuration=Configuration(api_key={"sessionAuth":"<sessionid cookie value>","csrfAuth":"<csrftoken cookie value>",},...)withApiClient(configuration)asapi_client:...

This authentication option is deprecated and will be removed in future.

configuration=Configuration(api_key={"tokenAuth":"Token <api key value>",},...)withApiClient(configuration)asapi_client:...

Session authentication and token authentication tokens can be received by logging inusing theApiClient.auth_api.create_login() function. Then, the authentication keyscan be set in theApiClient instance.

fromcvat_sdk.api_clientimportmodels(auth,_)=api_client.auth_api.create_login(models.LoginSerializerExRequest(username="username",password="password"))# Set up required headersassert"sessionid"inapi_client.cookies# managed by ApiClient automaticallyapi_client.set_default_header("X-CSRFToken",api_client.cookies["csrftoken"].value)api_client.set_default_header("Origin",api_client.build_origin_header())

This authentication option is deprecated and will be removed in future.

fromcvat_sdk.api_clientimportmodels(auth,_)=api_client.auth_api.create_login(models.LoginSerializerExRequest(username="username",password="password"))api_client.set_default_header("Authorization","Token "+auth.key)

API wrappers

API endpoints are grouped by tags into separate classes in thecvat_sdk.api_client.apis package.

APIs can be accessed asApiClient object members:

api_client.auth_api.<operation>(...)api_client.tasks_api.<operation>(...)

And APIs can be instantiated directly like this:

fromcvat_sdk.api_clientimportApiClient,apisapi_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 metainformationabout 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 otherfunctions and invoke it from there.

For a typical server entity likeTask,Project,Job etc., the*Api classes provide methodsthat 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 documentationhere.

Models

Requests and responses can include data. It can be represented as plain Pythondata structures and model classes (or models). In CVAT API, model for requests and responsesare separated: the request models have theRequest suffix in the name, while the responsemodels have no suffix. Models can be found in thecvat_sdk.api_client.models package.

Models can be instantiated like this:

fromcvat_sdk.api_clientimportmodelsuser_model=models.User(...)

Model parameters can be passed as models, or as plain Python data structures. This rule appliesrecursively, starting from the method parameters. In particular, this means you can passa dict into a method or into a model constructor, and corresponding fields willbe 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 likeI<model name>. They can beused to implement your own classes or describe APIs. They just provide type annotationsand descriptions for model fields.

You can export model values to plain Python dicts using theto_dict() method andthecvat_sdk.api_client.model_utils.to_json() function.

You can find the list of the available models and their documentationhere.

Sending requests

To send a request to a server endpoint, you need to obtain an instance of the corresponding*Apiclass. You can find summary about available API classes and supported endpointshere. The*Api instance object allows to send requests to the relevantserver 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 doesnot have any return value,None is always returned as the first value. You can controlautomatic 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 asstatus code, headers, or raw response data. By default, the status code of the response ischecked 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 notchecked, you will need to manually check the response status code and perform actions needed.

A typical endpoint call looks like this:

fromcvat_sdk.api_clientimportApiClient,apiswithApiClient(...)asapi_client:...(data,response)=api_client.tasks_api.list()# process the response ...

Operation parameters can be passed as positional or keyword arguments. API methods provideextra 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, andNone is returned. Can be useful,for instance, if you need to parse data manually, or if you expect an error in the response.Default isTrue.
  • _check_status (bool) - Allows to enable or disable response status checks. When enabled, theresponse status code is checked to be positive as defined in theHTTP standards.In the case of negative status, an exception is raised. Default isTrue.
  • _validate_inputs (bool): specifies if type checking should be done on the datasent to the server. Default isTrue.
  • _validate_outputs (bool): specifies if type checking should be done on the datareceived from the server. Default isTrue.
  • _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 alsobe a tuple with (connection, read) timeouts. Default isNone, which means no timeout.
  • _content_type (None | str) - Allows to specify theContent-Type header valuefor the request. Endpoints can support different content types and behave differentlydepending on the value. For file uploads_content_type="multipart/form-data" must be specified.Read more about file uploadshere. Default isapplication/json.

Note

The API is autogenerated. In some cases the server API schema may be incompleteor underspecified. Please report to us all the problems found. A typical problem is that aresponse data can’t be parsed automatically due to the incorrect schema. In this case, thesimplest workaround is to disable response parsing using the_parse_response=Falsemethod argument.

You can find many examples of API client usage in REST API testshere.

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, theseendpoints are calledlist_.... When there are lots of data, the responses can be paginated toreduce 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 parametersfor this, so the solution is to write a loop to collect and join data from multiple requests.SDK provides an utility function for this atcvat_sdk.core.helpers.get_paginated_collection().

Example:

fromcvat_sdk.core.helpersimportget_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 thelow-level SDK API. Please use the following recommendations.

Sending data

By default, requests use theapplication/json content type, which is a text type.However, it’s inefficient to send binary data in this encoding, and the data passedwon’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 asmultipart/form-data, so the recommended solution is tosplit fields into files and others, and send them in different requests with different contenttypes:

Example:

data={'client_files':[...],# a list of binary files'image_quality':...,# a simple type - int'job_file_mapping':[...],# a complex type - list}# Initialize uploadingapi_client.tasks_api.create_data(id=42,data_request=models.DataRequest(image_quality=data["image_quality"]),upload_start=True,)# Upload binary dataapi_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 fieldsapi_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 unexpectedbehavior, 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 datacan be fetched directly from the response:

importjsonfromhttpimportHTTPStatusfromtimeimportsleepfromurllib.parseimportparse_qsl,urlparsefromcvat_sdk.api_clientimportApiClient,Configuration,modelsinterval=1withApiClient(configuration=Configuration(host="<cvat_host>",username="<username>",password="<password>"))asapi_client:# Initiate the process to export a task as a dataset(_,response)=api_client.tasks_api.create_dataset_export(id=task_id,format="COCO 1.0",save_images=True,_parse_response=False,)assertresponse.status==HTTPStatus.ACCEPTED# Obtain the background request ID from the server responserq_id=json.loads(response.data).get("rq_id")assertrq_id,"The rq_id parameter was not found in the server response"# Check the status of the background processwhileTrue:(background_request,response)=api_client.requests_api.retrieve(rq_id)assertresponse.status==HTTPStatus.OKprocess_status=background_request.status.valueifprocess_statusin(models.RequestStatus.allowed_values[("value",)]["FINISHED"],models.RequestStatus.allowed_values[("value",)]["FAILED"],):breaksleep(interval)ifprocess_status!=models.RequestStatus.allowed_values[("value",)]["FINISHED"]:exception_msg=f"Export failed with status:{process_status}"ifbackground_request.message:exception_msg+=f". Details:{background_request.message}"assertFalse,exception_msg# Download a prepared fileresult_url=background_request.result_urlassertresult_url,"No 'result_url' in the server response"parsed_result_url=urlparse(result_url)query_params=parse_qsl(parsed_result_url.query)_,response=api_client.call_api(parsed_result_url.path,method="GET",query_params=query_params,auth_settings=api_client.configuration.auth_settings(),_parse_response=False,)# Save the resulting filewithopen("output_file.zip","wb")asoutput_file:while(chunk:=response.read(8192)):output_file.write(chunk)

Different versions of API endpoints

The cloudstorages/id/content REST API endpoint

Warning

Theretrieve_content method ofcloudstorages_api will be deprecated in 2.5.0 version.We recommend usingretrieve_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 methodretrieve_content_v2.

frompprintimportpprintfromcvat_sdk.api_clientimportApiClient,Configurationnext_token=Nonefiles,prefixes=[],[]prefix=""withApiClient(configuration=Configuration(host=BASE_URL,username=user,password=password))asapi_client:whileTrue:data,response=api_client.cloudstorages_api.retrieve_content_v2(cloud_storage_id,**({"prefix":prefix}ifprefixelse{}),**({"next_token":next_token}ifnext_tokenelse{}),)# 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"]forfindata["content"]ifstr(f["type"])=="REG"])prefixes.extend([prefix+f["name"]forfindata["content"]ifstr(f["type"])=="DIR"])next_token=data["next"]ifnext_token:continueifnotlen(prefixes):breakprefix=f"{prefixes.pop()}/"pprint(files)# ['sub/image_1.jpg', 'image_2.jpg']

3 - High-level API

Overview

This layer provides high-level APIs, allowing easier access to server operations.API includesRepositories andEntities. Repositories provide managementoperations for Entities. Entities represent objects on the server(e.g. projects, tasks, jobs etc) and simplify interaction with them. The key differencefrom the low-level API is that operations on this layer are not limited by a singleserver request per operation and encapsulate low-level request machinery behind a high-levelobject-oriented API.

The code of this component is located in thecvat_sdk.core package.

Example

fromcvat_sdkimportmake_client,modelsfromcvat_sdk.core.proxies.tasksimportResourceType,Task# Create a Client instance bound to a local server and authenticate using basic authwithmake_client(host="http://localhost",credentials=('user','password'))asclient:# 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.asserttask.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

Thecvat_sdk.core.client.Client class provides session management, implementsauthentication operations and simplifies access to server APIs.It is the starting point for using CVAT SDK.

AClient instance allows you to:

  • configure connection options with theConfig class
  • check server API compatibility with the current SDK version
  • deduce server connection scheme (https orhttp) automatically
  • manage user session with thelogin(),logout() and other methods
  • obtain Repository objects with theusers,tasks,jobs and other members
  • reach to lower-level APIs with the corresponding members

An instance ofClient can be created directly by calling the class constructoror with the utility functioncvat_sdk.core.client.make_client() which can handlesome configuration for you. AClient can be configured withthecvat_sdk.core.client.Config class instance. AConfig object can be passed totheClient constructor and then it will be available in theClient.config field.

TheClient class implements thecontext manager protocol.When the context is closed, the session is finished, and the user is logged outautomatically. Otherwise, these actions can be done with theclose() andlogout() methods.

You can create and start using aClient instance this way:

fromcvat_sdkimportmake_clientwithmake_client('http://localhost',port='8080',credentials=('user','password'))asclient:...

Themake_client() function handles configuration and object creation for you.It also allows to authenticate right after the object is created.

If you need to configureClient parameters, you can do this:

fromcvat_sdkimportConfig,Clientconfig=Config()# set up some config fields ...withClient('http://localhost:8080',config=config)asclient:client.login(('user','password'))...

Note

Historically, the SDK has allowed the URL scheme (http: orhttps:)to be omitted, and would attempt to automatically detect the protocol.This behavior is deprecated due to being inherently insecure,and will be removed in a future version.To avoid future breakage, make sure to specify the scheme explicitly.

When the server is located, its version is checked. If an unsupported version is found,an error can be raised or suppressed (controlled byconfig.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

AllClient operations rely on the server API and depend on the current userrights. This affects the set of available APIs, objects and actions. For example, a regular usercan 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 theorganization_slug property ofClient instances.The organization context affects which entities are visible,and where new entities are created.

Setorganization_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 organizationtask=client.tasks.create_from_data(...)

You can also setorganization_slug to an empty stringto work in the context of the user’s personal workspace.By default, it is set toNone,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 theorganization_context function:

withclient.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 fieldsand implement additional relevant operations, including both the general Read-Update-Delete andobject-specific ones. The set of available general operations depends on the object type.

Repositories provide management operations for corresponding Entities. You don’tneed to create Repository objects manually. To obtain a Repository object, use thecorrespondingClient instance member:

client.projectsclient.tasksclient.jobsclient.users...

An Entity can be created on the server with the corresponding Repository methodcreate():

task=client.tasks.create(<taskconfig>)

We can retrieve server objects using theretrieve() andlist() methods of the Repository:

job=client.jobs.retrieve(<jobid>)tasks=client.tasks.list()

After calling these functions, we obtain local objects representing their server counterparts.

Object fields can be updated with theupdate() method. Note that the set of fields that can bemodified 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 stateafter 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 thefetch() method:

# obtain 2 local copies of the same jobjob_ref1=client.jobs.retrieve(1)job_ref2=client.jobs.retrieve(1)# update the server object with the first referencejob_ref1.update(...)# job_ref2 is outdated nowjob_ref2.fetch()# job_ref2 is synced

Finally, if you need to remove the object from the server, you can use theremove() method.The server object will be removed, but the local copy of the object will remain untouched.

task=client.tasks.retrieve(<taskid>)task.remove()

Repositories can also provide group operations over entities. For instance, you can retrieveall available objects using thelist() Repository method. The list of availableEntity and Repository operations depends on the object type.

You can learn more about entity members and how model parameters are passed to functionshere.

The implementation for these components is located incvat_sdk.core.proxies.

4 - PyTorch adapter

Overview

This layer provides functionalitythat enables you to treat CVAT projects and tasks as PyTorch datasets.

The code of this layer is located in thecvat_sdk.pytorch package.To use it, you must install thecvat_sdk distribution with thepytorch extra.

Example

importtorchimporttorchvision.modelsfromcvat_sdkimportmake_clientfromcvat_sdk.pytorchimportProjectVisionDataset,ExtractSingleLabelIndex# create a PyTorch modelmodel=torchvision.models.resnet34(weights=torchvision.models.ResNet34_Weights.IMAGENET1K_V1)model.eval()# log into the CVAT serverwithmake_client(host="http://localhost",credentials=('user','password'))asclient:# get the dataset comprising all tasks for the Validation subset of project 12345dataset=ProjectVisionDataset(client,project_id=12345,include_subsets=['Validation'],# use transforms that fit our neural networktransform=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 datasetimage,target=dataset[0]# evaluate the network on the sample and compare the output to the targetoutput=model(image)iftorch.equal(output,target):print("correct prediction")else:print("incorrect prediction")

Datasets

The key components of this layer are the dataset classes,ProjectVisionDataset andTaskVisionDataset,representing data & annotations contained in a CVAT project or task, respectively.Both of them are subclasses of thetorch.utils.data.Dataset abstract class.

The interface ofDataset is essentially that of a sequencewhose elements are samples from the dataset.In the case ofTaskVisionDataset, each sample represents a frame from the taskand 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 ofProjectVisionDataset,each sample is a sample from one of the project’s tasks,as if obtained from aTaskVisionDataset instance created for that task.The full sequence of samples is built by concatenating the sequences of samplesfrom all included tasks in an unspecified orderthat is guaranteed to be consistent between executions.For details on what tasks are included, seeTask filtering.

Construction

Both dataset classes are instantiated by passing in an instance ofcvat_sdk.Clientand 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(seeCaching 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]):seeLabel index assignment.

Note that track annotations are currently inaccessible.

Transform support

The dataset classes support torchvision-like transformsthat you can supply to preprocess each sample before it’s returned.You can use this to convert the samples to a more convenient formator 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 ofsupplied transforms:

  • transforms:transforms(image, target).
  • transform:(transform(image), target).
  • target_transform:(image, target_transform(target)).
  • transform andtarget_transform:(transform(image), target_transform(target)).

transforms cannot be supplied at the same timeas eithertransform ortarget_transform.

Thecvat_sdk.pytorch module contains some target transform classesthat are intended for common use cases.SeeTransforms.

Label index assignment

The annotation model classes (LabeledImage andLabeledShape)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 thatis intended to be a project-independent identifier.These indices are accessible via thelabel_id_to_index attributeon 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 orderthat remains consistent across executions,and assign them sequential indices, starting with 0.

You can override this behavior and specify your own label indiceswith thelabel_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 assignedby looking up each label’s name in the provided mapping and using the result.

Task filtering

Note: this section applies only toProjectVisionDataset.

By default, aProjectVisionDataset includes samplesfrom 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 ofITaskRead corresponding to that taskpassed as the argument.Only tasks for whichTrue is returned will be included.

  • include_subsets (Container[str]):if set, only tasks whose subset is a member of the containerwill 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 constructionaccording to the policy set by theupdate_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 thecache_dir setting in theClient configuration.

Transforms

The layer provides some classes whose instances are callablessuitable for usage with thetarget_transform dataset constructor parameterthat 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 objectwhose types are contained in the value ofinclude_shape_types.Then returns a dictionary with the following string keys(whereN is the number of gathered shapes):

  • "boxes" (a floating-point tensor of shapeNx4).Each row represents the bounding box the corresponding shapein the following format:[x_min, y_min, x_max, y_max].

  • "labels" (an integer tensor of shapeN).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 annotationsor more than one tag annotation, raisesValueError.Otherwise, returns the index of the label in the solitary tag annotationas a zero-dimensional tensor.

Example:

ExtractSingleLabelIndex()

5 - Auto-annotation API

Overview

This layer provides functionality that allows you to automatically annotate a CVAT datasetby running a custom function on your local machine.A function, in this context, is a Python object that implements a particular protocoldefined 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 modeland 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.

Theauto-annotate CLI command provides a way to use an AA function from the command linerather than from a Python program.Seethe CLI documentation for details.

Example

fromtypingimportListimportPIL.Imageimporttorchvision.modelsfromcvat_sdkimportmake_clientimportcvat_sdk.modelsasmodelsimportcvat_sdk.auto_annotationascvataaclassTorchvisionDetectionFunction:def__init__(self,model_name:str,weights_name:str,**kwargs)->None:# load the ML modelweights_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()@propertydefspec(self)->cvataa.DetectionFunctionSpec:# describe the annotationsreturncvataa.DetectionFunctionSpec(labels=[cvataa.label_spec(cat,i,type="rectangle")fori,catinenumerate(self._weights.meta["categories"])ifcat!="N/A"])defdetect(self,context:cvataa.DetectionFunctionContext,image:PIL.Image.Image)->list[models.LabeledShapeRequest]:# determine the threshold for filtering resultsconf_threshold=context.conf_thresholdor0# convert the input into a form the model can understandtransformed_image=[self._transforms(image)]# run the ML modelresults=self._model(transformed_image)# convert the results into a form CVAT can understandreturn[cvataa.rectangle(label.item(),[x.item()forxinbox])forresultinresultsforbox,label,scoreinzip(result["boxes"],result["labels"],result["scores"])ifscore>=conf_threshold]# log into the CVAT serverwithmake_client(host="http://localhost",credentials=("user","password"))asclient:# annotate task 12345 using Faster R-CNNcvataa.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 anddetect.

spec must contain the AA function’s specification,which is an instance ofDetectionFunctionSpec.

DetectionFunctionSpec must be initialized with a sequence ofPatchedLabelRequest objectsthat represent the labels that the AA function knows about.See the docstring ofDetectionFunctionSpec for more information on the constraintsthat these objects must follow.BadFunctionError will be raised if any constraint violations are detected.

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 functionshould use to filter objects. IfNone, the function may apply a defaultthreshold at its discretion.
  • image (PIL.Image.Image).Contains image data.

detect must return a list ofLabeledShapeRequest objects,representing shapes found in the image.See the docstring ofDetectionFunctionSpec for more information on the constraintsthat these objects must follow.

The same AA function may be used with any dataset that contain labels with the same nameas 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:

NameID
bat0
rat1

And the dataset defines the following labels:

NameID
bat100
cat101
rat102

Then supposedetect returns a shape withlabel_id equal to 1.The driver will see that it refers to therat label, and replace it with 102,since that’s the ID this label has in the dataset.

The same logic is used for sublabel and attribute 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 constructorand sometimes setting some attributes to fixed values.

The following helpers are available for building specifications:

NameModel typeFixed attributes
label_specPatchedLabelRequest-
skeleton_label_specPatchedLabelRequesttype="skeleton"
keypoint_specSublabelRequesttype="points"
attribute_specAttributeRequestmutable=False
checkbox_attribute_specAttributeRequestmutable=False,input_type="checkbox",values=[]
number_attribute_specAttributeRequestmutable=False,input_type="number"
radio_attribute_specAttributeRequestmutable=False,input_type="radio"
select_attribute_specAttributeRequestmutable=False,input_type="select"
text_attribute_specAttributeRequestmutable=False,input_type="number",values=[]

Fornumber_attribute_spec,it’s recommended to use thecvat_sdk.attributes.number_attribute_values functionto create thevalues argument, since this function will enforce the constraints expectedfor attribute specs of this type.For example:

cvataa.number_attribute_spec("size",1,number_attribute_values(0,10))

The following helpers are available for use indetect:

NameModel typeFixed attributes
shapeLabeledShapeRequestframe=0
maskLabeledShapeRequestframe=0,type="mask"
polygonLabeledShapeRequestframe=0,type="polygon"
rectangleLabeledShapeRequestframe=0,type="rectangle"
skeletonLabeledShapeRequestframe=0,type="skeleton"
keypointSubLabeledShapeRequestframe=0,type="points"

Formask, it is recommended to create the points list usingthecvat_sdk.masks.encode_mask function, which will convert a bitmap into alist 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))

To create shapes with attributes,it’s recommended to use thecvat_sdk.attributes.attribute_vals_from_dict function,which returns a list of objects that can be passed to anattributes argument:

cvataa.rectangle(my_label,[x1,y2,x2,y2],attributes=attribute_vals_from_dict({my_attr1:val1,my_attr2:val2}))

Auto-annotation driver

Theannotate_task function uses an AA function to annotate a CVAT task.It must be called as follows:

annotate_task(<client>,<taskID>,<AAfunction>,<optionalarguments...>)

The supplied client will be used to make all API calls.

By default, new annotations will be appended to the old ones.Useclear_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 useallow_unmatched_label=True, then such labels will be ignored,and any shapes referring to them will be dropped.Same logic applies to sublabels and attributes.

It’s possible to pass a custom confidence threshold to the function via theconf_threshold parameter.

annotate_task will raise aBadFunctionError exceptionif 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 moduleto allow usage via the CLIauto-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 fromthetorchvision library.It produces rectangle annotations.

To use it, install CVAT SDK with thepytorch extra:

$ pip install "cvat-sdk[pytorch]"

Usage from Python:

fromcvat_sdk.auto_annotation.functions.torchvision_detectionimportcreateascreate_torchvisionannotate_task(<client>,<taskID>,create_torchvision(<modelname>,...))

Usage from the CLI:

cvat-cli auto-annotate"<task ID>" --function-module cvat_sdk.auto_annotation.functions.torchvision_detection\      -pmodel_name=str:"<model name>" ...

Thecreate function accepts the following parameters:

  • model_name (str) - the name of the model, such asfasterrcnn_resnet50_fpn_v2.This parameter is required.
  • weights_name (str) - the name of a weights enum value for the model, such asCOCO_V1.Defaults toDEFAULT.

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 totorchvision_detection,except it uses torchvision’s instance segmentation models and produces maskor polygon annotations (depending on the value ofconv_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 totorchvision_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.

6 - Developer guide

Overview

This package contains manually written and autogenerated files. We store only sources inthe 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 ./cvat-cli

    If you want to edit package files, install them with-e:

    pip install -e ./cvat-sdk -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 intothegen/templates/openapi-generator/ directory.

Relevant links:

How to test

API client tests are integrated into REST API tests in/tests/python/rest_apiand 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 generatedApiClient code is modified from whatopenapi-generator does by default.Changes are mostly focused on better user experience - including betterusage 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 typesgenerated by default are supposed to work with the API implementation(parameter validation and parsing), but they are not applicable astype annotations (they have incorrect syntax). Custom post-processingallowed us to make these types correct type annotations.Other possible solutions:

    • There is thepython-experimental API generator, which may solvesome issues, but it is unstable and requires python 3.9. Our APIworks 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 andlogic for this. Onlyif checks andfor loops are available inmustache templates, which is not enough for annotation generation.
  • Separate APIs are embedded into the generalAPIClient class.Now we have:

    withApiClient(config)asapi_client:result1=api_client.foo_api.operation1()result2=api_client.bar_api.operation2()

    This showed to be more convenient than the default:

    withApiClient(config)asapi_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 aresupposed to be uniquein the OpenAPI / Swagger specification. Therefore, we can’t generate suchschema on the server, nor we can’t expect it to be supported in theAPI generator.

  • Operations have IDs like<api>/<method>_<object>.This also showed to be more readable and more natural than DRF-spectacular’sdefault<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(likecreate orpartial_update) has the same type for input and output(because it looks natural), it also leads to the situation, in which thereare 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 theApiClient 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 useris required to pass aConfiguration object each time, which is clumsy and adds little sense.