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

Return to the regular view of this page.

APIs

All URIs are relative to http://localhost

Class Method HTTP request Description
AnalyticsApi create_report POST /api/analytics/reports Creates a analytics report asynchronously and allows to check request status
AnalyticsApi get_reports GET /api/analytics/reports Method returns analytics report
AssetsApi create POST /api/assets Method saves new asset on the server and attaches it to a corresponding guide
AssetsApi destroy DELETE /api/assets/{uuid} Method deletes a specific asset from the server
AssetsApi retrieve GET /api/assets/{uuid} Method returns an asset file
AuthApi create_login POST /api/auth/login
AuthApi create_logout POST /api/auth/logout
AuthApi create_password_change POST /api/auth/password/change
AuthApi create_password_reset POST /api/auth/password/reset
AuthApi create_password_reset_confirm POST /api/auth/password/reset/confirm
AuthApi create_register POST /api/auth/register
AuthApi create_signing POST /api/auth/signing This method signs URL for access to the server
AuthApi retrieve_rules GET /api/auth/rules
CloudstoragesApi create POST /api/cloudstorages Method creates a cloud storage with a specified characteristics
CloudstoragesApi destroy DELETE /api/cloudstorages/{id} Method deletes a specific cloud storage
CloudstoragesApi list GET /api/cloudstorages Returns a paginated list of storages
CloudstoragesApi partial_update PATCH /api/cloudstorages/{id} Methods does a partial update of chosen fields in a cloud storage instance
CloudstoragesApi retrieve GET /api/cloudstorages/{id} Method returns details of a specific cloud storage
CloudstoragesApi retrieve_actions GET /api/cloudstorages/{id}/actions Method returns allowed actions for the cloud storage
CloudstoragesApi retrieve_content_v2 GET /api/cloudstorages/{id}/content-v2 Method returns the content of the cloud storage
CloudstoragesApi retrieve_preview GET /api/cloudstorages/{id}/preview Method returns a preview image from a cloud storage
CloudstoragesApi retrieve_status GET /api/cloudstorages/{id}/status Method returns a cloud storage status
CommentsApi create POST /api/comments Method creates a comment
CommentsApi destroy DELETE /api/comments/{id} Method deletes a comment
CommentsApi list GET /api/comments Method returns a paginated list of comments
CommentsApi partial_update PATCH /api/comments/{id} Methods does a partial update of chosen fields in a comment
CommentsApi retrieve GET /api/comments/{id} Method returns details of a comment
EventsApi create POST /api/events Method saves logs from a client on the server
EventsApi list GET /api/events Method returns csv log file
GuidesApi create POST /api/guides Method creates a new annotation guide binded to a project or to a task
GuidesApi destroy DELETE /api/guides/{id} Method deletes a specific annotation guide and all attached assets
GuidesApi partial_update PATCH /api/guides/{id} Methods does a partial update of chosen fields in an annotation guide
GuidesApi retrieve GET /api/guides/{id} Method returns details of a specific annotation guide
InvitationsApi accept POST /api/invitations/{key}/accept Method registers user and accepts invitation to organization
InvitationsApi create POST /api/invitations Method creates an invitation
InvitationsApi decline POST /api/invitations/{key}/decline Method declines the invitation to organization
InvitationsApi destroy DELETE /api/invitations/{key} Method deletes an invitation
InvitationsApi list GET /api/invitations Method returns a paginated list of invitations
InvitationsApi partial_update PATCH /api/invitations/{key} Methods does a partial update of chosen fields in an invitation
InvitationsApi resend POST /api/invitations/{key}/resend Method resends the invitation to organization
InvitationsApi retrieve GET /api/invitations/{key} Method returns details of an invitation
IssuesApi create POST /api/issues Method creates an issue
IssuesApi destroy DELETE /api/issues/{id} Method deletes an issue
IssuesApi list GET /api/issues Method returns a paginated list of issues
IssuesApi partial_update PATCH /api/issues/{id} Methods does a partial update of chosen fields in an issue
IssuesApi retrieve GET /api/issues/{id} Method returns details of an issue
JobsApi create POST /api/jobs Method creates a new job in the task
JobsApi create_annotations POST /api/jobs/{id}/annotations/ Method allows to initialize the process of the job annotation upload from a local file or a cloud storage
JobsApi destroy DELETE /api/jobs/{id} Method deletes a job and its related annotations
JobsApi destroy_annotations DELETE /api/jobs/{id}/annotations/ Method deletes all annotations for a specific job
JobsApi list GET /api/jobs Method returns a paginated list of jobs
JobsApi partial_update PATCH /api/jobs/{id} Methods does a partial update of chosen fields in a job
JobsApi partial_update_annotations PATCH /api/jobs/{id}/annotations/ Method performs a partial update of annotations in a specific job
JobsApi retrieve GET /api/jobs/{id} Method returns details of a job
JobsApi retrieve_annotations GET /api/jobs/{id}/annotations/ Method returns annotations for a specific job as a JSON document. If format is specified, a zip archive is returned.
JobsApi retrieve_data GET /api/jobs/{id}/data Method returns data for a specific job
JobsApi retrieve_data_meta GET /api/jobs/{id}/data/meta Method provides a meta information about media files which are related with the job
JobsApi retrieve_dataset GET /api/jobs/{id}/dataset Export job as a dataset in a specific format
JobsApi retrieve_preview GET /api/jobs/{id}/preview Method returns a preview image for the job
JobsApi update_annotations PUT /api/jobs/{id}/annotations/ Method performs an update of all annotations in a specific job or used for uploading annotations from a file
LabelsApi destroy DELETE /api/labels/{id} Method deletes a label. To delete a sublabel, please use the PATCH method of the parent label
LabelsApi list GET /api/labels Method returns a paginated list of labels
LabelsApi partial_update PATCH /api/labels/{id} Methods does a partial update of chosen fields in a labelTo modify a sublabel, please use the PATCH method of the parent label
LabelsApi retrieve GET /api/labels/{id} Method returns details of a label
LambdaApi create_functions POST /api/lambda/functions/{func_id}
LambdaApi create_requests POST /api/lambda/requests Method calls the function
LambdaApi delete_requests DELETE /api/lambda/requests/{id} Method cancels the request
LambdaApi list_functions GET /api/lambda/functions Method returns a list of functions
LambdaApi list_requests GET /api/lambda/requests Method returns a list of requests
LambdaApi retrieve_functions GET /api/lambda/functions/{func_id} Method returns the information about the function
LambdaApi retrieve_requests GET /api/lambda/requests/{id} Method returns the status of the request
MembershipsApi destroy DELETE /api/memberships/{id} Method deletes a membership
MembershipsApi list GET /api/memberships Method returns a paginated list of memberships
MembershipsApi partial_update PATCH /api/memberships/{id} Methods does a partial update of chosen fields in a membership
MembershipsApi retrieve GET /api/memberships/{id} Method returns details of a membership
OrganizationsApi create POST /api/organizations Method creates an organization
OrganizationsApi destroy DELETE /api/organizations/{id} Method deletes an organization
OrganizationsApi list GET /api/organizations Method returns a paginated list of organizations
OrganizationsApi partial_update PATCH /api/organizations/{id} Methods does a partial update of chosen fields in an organization
OrganizationsApi retrieve GET /api/organizations/{id} Method returns details of an organization
ProjectsApi create POST /api/projects Method creates a new project
ProjectsApi create_backup POST /api/projects/backup/ Methods create a project from a backup
ProjectsApi create_dataset POST /api/projects/{id}/dataset/ Import dataset in specific format as a project or check status of dataset import process
ProjectsApi destroy DELETE /api/projects/{id} Method deletes a specific project
ProjectsApi list GET /api/projects Returns a paginated list of projects
ProjectsApi partial_update PATCH /api/projects/{id} Methods does a partial update of chosen fields in a project
ProjectsApi retrieve GET /api/projects/{id} Method returns details of a specific project
ProjectsApi retrieve_annotations GET /api/projects/{id}/annotations Method allows to download project annotations
ProjectsApi retrieve_backup GET /api/projects/{id}/backup Methods creates a backup copy of a project
ProjectsApi retrieve_dataset GET /api/projects/{id}/dataset/ Export project as a dataset in a specific format
ProjectsApi retrieve_preview GET /api/projects/{id}/preview Method returns a preview image for the project
QualityApi create_report POST /api/quality/reports Creates a quality report asynchronously and allows to check request status
QualityApi list_conflicts GET /api/quality/conflicts Method returns a paginated list of annotation conflicts
QualityApi list_reports GET /api/quality/reports Method returns a paginated list of quality reports
QualityApi list_settings GET /api/quality/settings Method returns a paginated list of quality settings instances
QualityApi partial_update_settings PATCH /api/quality/settings/{id} Methods does a partial update of chosen fields in the quality settings instance
QualityApi retrieve_report GET /api/quality/reports/{id} Method returns details of a quality report
QualityApi retrieve_report_data GET /api/quality/reports/{id}/data Retrieve full contents of the report in JSON format
QualityApi retrieve_settings GET /api/quality/settings/{id} Method returns details of the quality settings instance
SchemaApi retrieve GET /api/schema/
ServerApi list_share GET /api/server/share Returns all files and folders that are on the server along specified path
ServerApi retrieve_about GET /api/server/about Method provides basic CVAT information
ServerApi retrieve_annotation_formats GET /api/server/annotation/formats Method provides the list of supported annotations formats
ServerApi retrieve_plugins GET /api/server/plugins Method provides allowed plugins
TasksApi jobs_partial_update_data_meta PATCH /api/jobs/{id}/data/meta Method provides a meta information about media files which are related with the job
TasksApi create POST /api/tasks Method creates a new task in a database without any attached images and videos
TasksApi create_annotations POST /api/tasks/{id}/annotations/ Method allows to initialize the process of upload task annotations from a local or a cloud storage file
TasksApi create_backup POST /api/tasks/backup/ Method recreates a task from an attached task backup file
TasksApi create_data POST /api/tasks/{id}/data/ Method permanently attaches data (images, video, etc.) to a task
TasksApi destroy DELETE /api/tasks/{id} Method deletes a specific task, all attached jobs, annotations, and data
TasksApi destroy_annotations DELETE /api/tasks/{id}/annotations/ Method deletes all annotations for a specific task
TasksApi list GET /api/tasks Returns a paginated list of tasks
TasksApi partial_update PATCH /api/tasks/{id} Methods does a partial update of chosen fields in a task
TasksApi partial_update_annotations PATCH /api/tasks/{id}/annotations/ Method performs a partial update of annotations in a specific task
TasksApi partial_update_data_meta PATCH /api/tasks/{id}/data/meta Method provides a meta information about media files which are related with the task
TasksApi retrieve GET /api/tasks/{id} Method returns details of a specific task
TasksApi retrieve_annotations GET /api/tasks/{id}/annotations/ Method allows to download task annotations
TasksApi retrieve_backup GET /api/tasks/{id}/backup Method backup a specified task
TasksApi retrieve_data GET /api/tasks/{id}/data/ Method returns data for a specific task
TasksApi retrieve_data_meta GET /api/tasks/{id}/data/meta Method provides a meta information about media files which are related with the task
TasksApi retrieve_dataset GET /api/tasks/{id}/dataset Export task as a dataset in a specific format
TasksApi retrieve_preview GET /api/tasks/{id}/preview Method returns a preview image for the task
TasksApi retrieve_status GET /api/tasks/{id}/status When task is being created the method returns information about a status of the creation process
TasksApi update_annotations PUT /api/tasks/{id}/annotations/ Method allows to upload task annotations or edit existing annotations
UsersApi destroy DELETE /api/users/{id} Method deletes a specific user from the server
UsersApi list GET /api/users Method returns a paginated list of users
UsersApi partial_update PATCH /api/users/{id} Method updates chosen fields of a user
UsersApi retrieve GET /api/users/{id} Method provides information of a specific user
UsersApi retrieve_self GET /api/users/self Method returns an instance of a user who is currently authorized
WebhooksApi create POST /api/webhooks Method creates a webhook
WebhooksApi create_deliveries_redelivery POST /api/webhooks/{id}/deliveries/{delivery_id}/redelivery Method redeliver a specific webhook delivery
WebhooksApi create_ping POST /api/webhooks/{id}/ping Method send ping webhook
WebhooksApi destroy DELETE /api/webhooks/{id} Method deletes a webhook
WebhooksApi list GET /api/webhooks Method returns a paginated list of webhook according to query parameters
WebhooksApi list_deliveries GET /api/webhooks/{id}/deliveries Method return a list of deliveries for a specific webhook
WebhooksApi partial_update PATCH /api/webhooks/{id} Methods does a partial update of chosen fields in a webhook
WebhooksApi retrieve GET /api/webhooks/{id} Method returns details of a webhook
WebhooksApi retrieve_deliveries GET /api/webhooks/{id}/deliveries/{delivery_id} Method return a specific delivery for a specific webhook
WebhooksApi retrieve_events GET /api/webhooks/events Method return a list of available webhook events
WebhooksApi update PUT /api/webhooks/{id} Method updates a webhook by id

1 - AnalyticsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_report POST /api/analytics/reports Creates a analytics report asynchronously and allows to check request status
get_reports GET /api/analytics/reports Method returns analytics report

create_report

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

Creates a analytics report asynchronously and allows to check request status

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

get_reports

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

Method returns analytics report

Receive analytics report

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
404 Not found -

2 - AssetsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/assets Method saves new asset on the server and attaches it to a corresponding guide
destroy DELETE /api/assets/{uuid} Method deletes a specific asset from the server
retrieve GET /api/assets/{uuid} Method returns an asset file

create

create( file=None, **kwargs )

Method saves new asset on the server and attaches it to a corresponding guide

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
file file_type [optional]

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( uuid, **kwargs )

Method deletes a specific asset from the server

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve

retrieve( uuid, **kwargs )

Method returns an asset file

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Asset file -

3 - AuthApi class reference

All URIs are relative to http://localhost

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

create_login

create_login( login_serializer_ex_request, **kwargs )

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
login_serializer_ex_request LoginSerializerExRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

create_logout

create_logout( **kwargs )

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

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:

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

Parameters

This endpoint does not need any parameter.

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

create_password_change

create_password_change( password_change_request, **kwargs )

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
password_change_request PasswordChangeRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

create_password_reset

create_password_reset( password_reset_serializer_ex_request, **kwargs )

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
password_reset_serializer_ex_request PasswordResetSerializerExRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

create_password_reset_confirm

create_password_reset_confirm( password_reset_confirm_request, **kwargs )

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
password_reset_confirm_request PasswordResetConfirmRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

create_register

create_register( register_serializer_ex_request, **kwargs )

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
register_serializer_ex_request RegisterSerializerExRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

create_signing

create_signing( signing_request, **kwargs )

This method signs URL for access to the server

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
signing_request SigningRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 text URL -

retrieve_rules

retrieve_rules( **kwargs )

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:

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

Parameters

This endpoint does not need any parameter.

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

Returned values

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

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

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

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 No response body -

4 - CloudstoragesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/cloudstorages Method creates a cloud storage with a specified characteristics
destroy DELETE /api/cloudstorages/{id} Method deletes a specific cloud storage
list GET /api/cloudstorages Returns a paginated list of storages
partial_update PATCH /api/cloudstorages/{id} Methods does a partial update of chosen fields in a cloud storage instance
retrieve GET /api/cloudstorages/{id} Method returns details of a specific cloud storage
retrieve_actions GET /api/cloudstorages/{id}/actions Method returns allowed actions for the cloud storage
retrieve_content_v2 GET /api/cloudstorages/{id}/content-v2 Method returns the content of the cloud storage
retrieve_preview GET /api/cloudstorages/{id}/preview Method returns a preview image from a cloud storage
retrieve_status GET /api/cloudstorages/{id}/status Method returns a cloud storage status

create

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

Method creates a cloud storage with a specified characteristics

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Method deletes a specific cloud storage

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Returns a paginated list of storages

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in a cloud storage instance

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a specific cloud storage

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve_actions

retrieve_actions( id, **kwargs )

Method returns allowed actions for the cloud storage

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

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_content_v2

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

Method returns the content of the cloud storage

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A manifest content -

retrieve_preview

retrieve_preview( id, **kwargs )

Method returns a preview image from a cloud storage

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_status

retrieve_status( id, **kwargs )

Method returns a cloud storage status

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

5 - CommentsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/comments Method creates a comment
destroy DELETE /api/comments/{id} Method deletes a comment
list GET /api/comments Method returns a paginated list of comments
partial_update PATCH /api/comments/{id} Methods does a partial update of chosen fields in a comment
retrieve GET /api/comments/{id} Method returns details of a comment

create

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

Method creates a comment

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Method deletes a comment

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of comments

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in a comment

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a comment

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

6 - EventsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/events Method saves logs from a client on the server
list GET /api/events Method returns csv log file

create

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

Method saves logs from a client on the server

Sends logs to the Clickhouse if it is connected

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

list

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

Method returns csv log file

Receive logs from the server

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

7 - GuidesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/guides Method creates a new annotation guide binded to a project or to a task
destroy DELETE /api/guides/{id} Method deletes a specific annotation guide and all attached assets
partial_update PATCH /api/guides/{id} Methods does a partial update of chosen fields in an annotation guide
retrieve GET /api/guides/{id} Method returns details of a specific annotation guide

create

create( annotation_guide_write_request=None, **kwargs )

Method creates a new annotation guide binded to a project or to a task

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
annotation_guide_write_request AnnotationGuideWriteRequest [optional]

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Method deletes a specific annotation guide and all attached assets

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

partial_update

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

Methods does a partial update of chosen fields in an annotation guide

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a specific annotation guide

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

8 - InvitationsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
accept POST /api/invitations/{key}/accept Method registers user and accepts invitation to organization
create POST /api/invitations Method creates an invitation
decline POST /api/invitations/{key}/decline Method declines the invitation to organization
destroy DELETE /api/invitations/{key} Method deletes an invitation
list GET /api/invitations Method returns a paginated list of invitations
partial_update PATCH /api/invitations/{key} Methods does a partial update of chosen fields in an invitation
resend POST /api/invitations/{key}/resend Method resends the invitation to organization
retrieve GET /api/invitations/{key} Method returns details of an invitation

accept

accept( key, **kwargs )

Method registers user and accepts invitation to organization

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

create

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

Method creates an invitation

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

decline

decline( key, **kwargs )

Method declines the invitation to organization

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

destroy

destroy( key, **kwargs )

Method deletes an invitation

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of invitations

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in an invitation

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

resend

resend( key, **kwargs )

Method resends the invitation to organization

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve

retrieve( key, **kwargs )

Method returns details of an invitation

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

9 - IssuesApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/issues Method creates an issue
destroy DELETE /api/issues/{id} Method deletes an issue
list GET /api/issues Method returns a paginated list of issues
partial_update PATCH /api/issues/{id} Methods does a partial update of chosen fields in an issue
retrieve GET /api/issues/{id} Method returns details of an issue

create

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

Method creates an issue

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Method deletes an issue

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of issues

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in an issue

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of an issue

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

10 - JobsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/jobs Method creates a new job in the task
create_annotations POST /api/jobs/{id}/annotations/ Method allows to initialize the process of the job annotation upload from a local file or a cloud storage
destroy DELETE /api/jobs/{id} Method deletes a job and its related annotations
destroy_annotations DELETE /api/jobs/{id}/annotations/ Method deletes all annotations for a specific job
list GET /api/jobs Method returns a paginated list of jobs
partial_update PATCH /api/jobs/{id} Methods does a partial update of chosen fields in a job
partial_update_annotations PATCH /api/jobs/{id}/annotations/ Method performs a partial update of annotations in a specific job
retrieve GET /api/jobs/{id} Method returns details of a job
retrieve_annotations GET /api/jobs/{id}/annotations/ Method returns annotations for a specific job as a JSON document. If format is specified, a zip archive is returned.
retrieve_data GET /api/jobs/{id}/data Method returns data for a specific job
retrieve_data_meta GET /api/jobs/{id}/data/meta Method provides a meta information about media files which are related with the job
retrieve_dataset GET /api/jobs/{id}/dataset Export job as a dataset in a specific format
retrieve_preview GET /api/jobs/{id}/preview Method returns a preview image for the job
update_annotations PUT /api/jobs/{id}/annotations/ Method performs an update of all annotations in a specific job or used for uploading annotations from a file

create

create( job_write_request, **kwargs )

Method creates a new job in the task

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
job_write_request JobWriteRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

create_annotations

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

Method allows to initialize the process of the job annotation upload from a local file or a cloud storage

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

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

destroy

destroy( id, **kwargs )

Method deletes a job and its related annotations

Please note, that not every job can be removed. Currently, it is only available for Ground Truth jobs.

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

destroy_annotations

destroy_annotations( id, **kwargs )

Method deletes all annotations for a specific job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of jobs

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in a job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update_annotations

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

Method performs a partial update of annotations in a specific job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Annotations successfully uploaded -

retrieve

retrieve( id, **kwargs )

Method returns details of a job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve_annotations

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

Method returns annotations for a specific job as a JSON document. If format is specified, a zip archive is returned.

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_data

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

Method returns data for a specific job

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    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:
        (data, response) = api_client.jobs_api.retrieve_data(
            id,
            number=number,
            quality=quality,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling JobsApi.retrieve_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
number int A unique number value identifying chunk or frame [optional]
quality str Specifies the quality level of the requested data [optional]
type str Specifies the type of the requested data [optional]

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_data_meta

retrieve_data_meta( id, **kwargs )

Method provides a meta information about media files which are related with the job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve_dataset

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

Export job as a dataset in a specific format

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_preview

retrieve_preview( id, **kwargs )

Method returns a preview image for the job

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Job image preview -

update_annotations

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

Method performs an update of all annotations in a specific job or used for uploading annotations from a file

To check the status of the process of uploading a job annotations from a file: After initiating the annotations upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent PUT /api/jobs/id/annotations requests to track the status of the annotations upload.

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

11 - LabelsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
destroy DELETE /api/labels/{id} Method deletes a label. To delete a sublabel, please use the PATCH method of the parent label
list GET /api/labels Method returns a paginated list of labels
partial_update PATCH /api/labels/{id} Methods does a partial update of chosen fields in a labelTo modify a sublabel, please use the PATCH method of the parent label
retrieve GET /api/labels/{id} Method returns details of a label

destroy

destroy( id, **kwargs )

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

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of labels

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in a labelTo modify a sublabel, please use the PATCH method of the parent label

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a label

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

12 - LambdaApi class reference

All URIs are relative to http://localhost

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

create_functions

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

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

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
func_id str
online_function_call_request OnlineFunctionCallRequest [optional]

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns function invocation results -

create_requests

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

Method calls the function

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

delete_requests

delete_requests( id, **kwargs )

Method cancels the request

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
id str Request id

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No response body -

list_functions

list_functions( **kwargs )

Method returns a list of functions

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:

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

Parameters

This endpoint does not need any parameter.

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 No response body -

list_requests

list_requests( **kwargs )

Method returns a list of requests

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:

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

Parameters

This endpoint does not need any parameter.

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve_functions

retrieve_functions( func_id, **kwargs )

Method returns the information about the function

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    func_id = "2" # str | 

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

Parameters

Name Type Description Notes
func_id str

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

Returned values

Returned type: Tuple[typing.Dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Information about the function -

retrieve_requests

retrieve_requests( id, **kwargs )

Method returns the status of the request

Example

from pprint import pprint

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

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

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

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

Parameters

Name Type Description Notes
id str Request id

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

13 - MembershipsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
destroy DELETE /api/memberships/{id} Method deletes a membership
list GET /api/memberships Method returns a paginated list of memberships
partial_update PATCH /api/memberships/{id} Methods does a partial update of chosen fields in a membership
retrieve GET /api/memberships/{id} Method returns details of a membership

destroy

destroy( id, **kwargs )

Method deletes a membership

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list

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

Method returns a paginated list of memberships

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

partial_update

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

Methods does a partial update of chosen fields in a membership

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this membership.
    patched_membership_write_request = PatchedMembershipWriteRequest(
        role=RoleEnum("worker"),
    ) # PatchedMembershipWriteRequest |  (optional)

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

Parameters

Name Type Description Notes
id int A unique integer value identifying this membership.
patched_membership_write_request PatchedMembershipWriteRequest [optional]

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a membership

Example

from pprint import pprint

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

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

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

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

Parameters

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

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

14 - OrganizationsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/organizations Method creates an organization
destroy DELETE /api/organizations/{id} Method deletes an organization
list GET /api/organizations Method returns a paginated list of organizations
partial_update PATCH /api/organizations/{id} Methods does a partial update of chosen fields in an organization
retrieve GET /api/organizations/{id} Method returns details of an organization

create

create( organization_write_request, **kwargs )

Method creates an organization

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    organization_write_request = OrganizationWriteRequest(
        slug="z",
        name="name_example",
        description="description_example",
        contact={},
    ) # OrganizationWriteRequest | 

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

Parameters

Name Type Description Notes
organization_write_request OrganizationWriteRequest

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

Returned values

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

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

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

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

destroy

destroy( id, **kwargs )

Method deletes an organization

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.

    try:
        api_client.organizations_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The organization has been deleted -

list

list( filter=None, name=None, owner=None, page=None, page_size=None, search=None, slug=None, sort=None, **kwargs )

Method returns a paginated list of organizations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['name', 'owner', 'slug', 'id']. (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('name', 'owner', 'slug') (optional)
    slug = "slug_example" # str | A simple equality filter for the slug field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['name', 'owner', 'slug', 'id'] (optional)

    try:
        (data, response) = api_client.organizations_api.list(
            filter=filter,
            name=name,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            slug=slug,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘name’, ‘owner’, ‘slug’, ‘id’]. [optional]
name str A simple equality filter for the name field [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘name’, ‘owner’, ‘slug’) [optional]
slug str A simple equality filter for the slug field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘name’, ‘owner’, ‘slug’, ‘id’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedOrganizationReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_organization_write_request=None, **kwargs )

Methods does a partial update of chosen fields in an organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.
    patched_organization_write_request = PatchedOrganizationWriteRequest(
        slug="z",
        name="name_example",
        description="description_example",
        contact={},
    ) # PatchedOrganizationWriteRequest |  (optional)

    try:
        (data, response) = api_client.organizations_api.partial_update(
            id,
            patched_organization_write_request=patched_organization_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.
patched_organization_write_request PatchedOrganizationWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[OrganizationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of an organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this organization.

    try:
        (data, response) = api_client.organizations_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling OrganizationsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this organization.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[OrganizationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

15 - ProjectsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/projects Method creates a new project
create_backup POST /api/projects/backup/ Methods create a project from a backup
create_dataset POST /api/projects/{id}/dataset/ Import dataset in specific format as a project or check status of dataset import process
destroy DELETE /api/projects/{id} Method deletes a specific project
list GET /api/projects Returns a paginated list of projects
partial_update PATCH /api/projects/{id} Methods does a partial update of chosen fields in a project
retrieve GET /api/projects/{id} Method returns details of a specific project
retrieve_annotations GET /api/projects/{id}/annotations Method allows to download project annotations
retrieve_backup GET /api/projects/{id}/backup Methods creates a backup copy of a project
retrieve_dataset GET /api/projects/{id}/dataset/ Export project as a dataset in a specific format
retrieve_preview GET /api/projects/{id}/preview Method returns a preview image for the project

create

create( project_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Method creates a new project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    project_write_request = ProjectWriteRequest(
        name="name_example",
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        target_storage=PatchedProjectWriteRequestTargetStorage(None),
        source_storage=PatchedProjectWriteRequestTargetStorage(None),
        task_subsets=[
            "task_subsets_example",
        ],
    ) # ProjectWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.projects_api.create(
            project_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
project_write_request ProjectWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_backup

create_backup( x_organization=None, cloud_storage_id=None, filename=None, location=None, org=None, org_id=None, rq_id=None, backup_write_request=None, **kwargs )

Methods create a project from a backup

The backup import process is as follows: The first request POST /api/projects/backup will initiate file upload and will create the rq job on the server in which the process of a project creating from an uploaded backup will be carried out. After initiating the backup upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent requests to track the status of the project creation. Once the project has been successfully created, the server will return the id of the newly created project.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "local" # str | Where to import the backup file from (optional) if omitted the server will use the default value of "local"
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    backup_write_request = BackupWriteRequest(None) # BackupWriteRequest |  (optional)

    try:
        api_client.projects_api.create_backup(
            x_organization=x_organization,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            org=org,
            org_id=org_id,
            rq_id=rq_id,
            backup_write_request=backup_write_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_backup(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where to import the backup file from [optional] if omitted the server will use the default value of “local”
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
rq_id str rq id [optional]
backup_write_request BackupWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 The project has been imported -
202 Importing a backup file has been started -

create_dataset

create_dataset( id, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, dataset_write_request=None, **kwargs )

Import dataset in specific format as a project or check status of dataset import process

The request POST /api/projects/id/dataset will initiate file upload and will create the rq job on the server in which the process of dataset import from a file will be carried out. Please, use the GET /api/projects/id/dataset endpoint for checking status of the process.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Dataset file name (optional)
    format = "format_example" # str | Desired dataset format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where to import the dataset from (optional)
    use_default_location = True # bool | Use the location that was configured in the project to import annotations (optional) if omitted the server will use the default value of True
    dataset_write_request = DatasetWriteRequest(None) # DatasetWriteRequest |  (optional)

    try:
        (data, response) = api_client.projects_api.create_dataset(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
            dataset_write_request=dataset_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.create_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
cloud_storage_id int Storage id [optional]
filename str Dataset file name [optional]
format str Desired dataset format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where to import the dataset from [optional]
use_default_location bool Use the location that was configured in the project to import annotations [optional] if omitted the server will use the default value of True
dataset_write_request DatasetWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[RqId, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
202 Importing has been started -
400 Failed to import dataset -
405 Format is not available -

destroy

destroy( id, **kwargs )

Method deletes a specific project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        api_client.projects_api.destroy(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The project has been deleted -

list

list( x_organization=None, assignee=None, filter=None, name=None, org=None, org_id=None, owner=None, page=None, page_size=None, search=None, sort=None, status=None, **kwargs )

Returns a paginated list of projects

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    assignee = "assignee_example" # str | A simple equality filter for the assignee field (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['name', 'owner', 'assignee', 'status', 'id', 'updated_date']. (optional)
    name = "name_example" # str | A simple equality filter for the name field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('name', 'owner', 'assignee', 'status') (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['name', 'owner', 'assignee', 'status', 'id', 'updated_date'] (optional)
    status = "annotation" # str | A simple equality filter for the status field (optional)

    try:
        (data, response) = api_client.projects_api.list(
            x_organization=x_organization,
            assignee=assignee,
            filter=filter,
            name=name,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
            status=status,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
assignee str A simple equality filter for the assignee field [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘name’, ‘owner’, ‘assignee’, ‘status’, ‘id’, ‘updated_date’]. [optional]
name str A simple equality filter for the name field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘name’, ‘owner’, ‘assignee’, ‘status’) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘name’, ‘owner’, ‘assignee’, ‘status’, ‘id’, ‘updated_date’] [optional]
status str A simple equality filter for the status field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedProjectReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( id, patched_project_write_request=None, **kwargs )

Methods does a partial update of chosen fields in a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    patched_project_write_request = PatchedProjectWriteRequest(
        name="name_example",
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        target_storage=PatchedProjectWriteRequestTargetStorage(None),
        source_storage=PatchedProjectWriteRequestTargetStorage(None),
        task_subsets=[
            "task_subsets_example",
        ],
    ) # PatchedProjectWriteRequest |  (optional)

    try:
        (data, response) = api_client.projects_api.partial_update(
            id,
            patched_project_write_request=patched_project_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
patched_project_write_request PatchedProjectWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve

retrieve( id, **kwargs )

Method returns details of a specific project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        (data, response) = api_client.projects_api.retrieve(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[ProjectRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotations

retrieve_annotations( format, id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Method allows to download project annotations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    use_default_location = True # bool | Use the location that was configured in project to export annotation (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.projects_api.retrieve_annotations(
            format,
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats
id int A unique integer value identifying this project.
action str Used to start downloading process locally after annotation file has been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
location str Where need to save downloaded dataset [optional]
use_default_location bool Use the location that was configured in project to export annotation [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AnnotationsRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Annotations file is ready to download -
202 Dump of annotations has been started -
401 Format is not specified -
405 Format is not available -

retrieve_backup

retrieve_backup( id, action=None, cloud_storage_id=None, filename=None, location=None, use_default_location=None, **kwargs )

Methods creates a backup copy of a project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process after backup file had been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "cloud_storage" # str | Where need to save downloaded backup (optional)
    use_default_location = True # bool | Use the location that was configured in project to export backup (optional) if omitted the server will use the default value of True

    try:
        api_client.projects_api.retrieve_backup(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            use_default_location=use_default_location,
        )
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_backup(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
action str Used to start downloading process after backup file had been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where need to save downloaded backup [optional]
use_default_location bool Use the location that was configured in project to export backup [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output backup file is ready for downloading -
202 Creating a backup file has been started -

retrieve_dataset

retrieve_dataset( id, action=None, cloud_storage_id=None, filename=None, format=None, location=None, rq_id=None, use_default_location=None, **kwargs )

Export project as a dataset in a specific format

To check the status of the process of importing a project dataset from a file: After initiating the dataset upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent GET /api/projects/id/dataset requests to track the status of the dataset import. Also you should specify action parameter: action=import_status.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.
    action = "download" # str | Used to start downloading process locally after annotation file has been created (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Desired output file name (optional)
    format = "format_example" # str | Desired output format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | Where need to save downloaded dataset (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    use_default_location = True # bool | Use the location that was configured in project to import dataset (optional) if omitted the server will use the default value of True

    try:
        (data, response) = api_client.projects_api.retrieve_dataset(
            id,
            action=action,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            rq_id=rq_id,
            use_default_location=use_default_location,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_dataset(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.
action str Used to start downloading process locally after annotation file has been created [optional]
cloud_storage_id int Storage id [optional]
filename str Desired output file name [optional]
format str Desired output format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str Where need to save downloaded dataset [optional]
rq_id str rq id [optional]
use_default_location bool Use the location that was configured in project to import dataset [optional] if omitted the server will use the default value of True

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[file_type, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 Download of file started -
201 Output file is ready for downloading -
202 Exporting has been started -
405 Format is not available -

retrieve_preview

retrieve_preview( id, **kwargs )

Method returns a preview image for the project

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this project.

    try:
        api_client.projects_api.retrieve_preview(
            id,)
    except exceptions.ApiException as e:
        print("Exception when calling ProjectsApi.retrieve_preview(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this project.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Project image preview -
404 Project image preview not found -

16 - QualityApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_report POST /api/quality/reports Creates a quality report asynchronously and allows to check request status
list_conflicts GET /api/quality/conflicts Method returns a paginated list of annotation conflicts
list_reports GET /api/quality/reports Method returns a paginated list of quality reports
list_settings GET /api/quality/settings Method returns a paginated list of quality settings instances
partial_update_settings PATCH /api/quality/settings/{id} Methods does a partial update of chosen fields in the quality settings instance
retrieve_report GET /api/quality/reports/{id} Method returns details of a quality report
retrieve_report_data GET /api/quality/reports/{id}/data Retrieve full contents of the report in JSON format
retrieve_settings GET /api/quality/settings/{id} Method returns details of the quality settings instance

create_report

create_report( rq_id=None, quality_report_create_request=None, **kwargs )

Creates a quality report asynchronously and allows to check request status

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    rq_id = "rq_id_example" # str | The report creation request id. Can be specified to check the report creation status.  (optional)
    quality_report_create_request = QualityReportCreateRequest(
        task_id=1,
    ) # QualityReportCreateRequest |  (optional)

    try:
        (data, response) = api_client.quality_api.create_report(
            rq_id=rq_id,
            quality_report_create_request=quality_report_create_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.create_report(): %s\n" % e)

Parameters

Name Type Description Notes
rq_id str The report creation request id. Can be specified to check the report creation status. [optional]
quality_report_create_request QualityReportCreateRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualityReport, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -
202 A quality report request has been enqueued, the request id is returned. The request status can be checked at this endpoint by passing the rq_id as the query parameter. If the request id is specified, this response means the quality report request is queued or is being processed. -
400 Invalid or failed request, check the response data for details -

list_conflicts

list_conflicts( x_organization=None, filter=None, frame=None, job_id=None, org=None, org_id=None, page=None, page_size=None, report_id=None, severity=None, sort=None, task_id=None, type=None, **kwargs )

Method returns a paginated list of annotation conflicts

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'frame', 'type', 'job_id', 'task_id', 'severity']. (optional)
    frame = 1 # int | A simple equality filter for the frame field (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    report_id = 1 # int | A simple equality filter for report id (optional)
    severity = "warning" # str | A simple equality filter for the severity field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id', 'frame', 'type', 'job_id', 'task_id', 'severity'] (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)
    type = "missing_annotation" # str | A simple equality filter for the type field (optional)

    try:
        (data, response) = api_client.quality_api.list_conflicts(
            x_organization=x_organization,
            filter=filter,
            frame=frame,
            job_id=job_id,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            report_id=report_id,
            severity=severity,
            sort=sort,
            task_id=task_id,
            type=type,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_conflicts(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ‘frame’, ‘type’, ‘job_id’, ‘task_id’, ‘severity’]. [optional]
frame int A simple equality filter for the frame field [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
report_id int A simple equality filter for report id [optional]
severity str A simple equality filter for the severity field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’, ‘frame’, ‘type’, ‘job_id’, ‘task_id’, ‘severity’] [optional]
task_id int A simple equality filter for the task_id field [optional]
type str A simple equality filter for the type field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedAnnotationConflictList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

list_reports

list_reports( x_organization=None, filter=None, job_id=None, org=None, org_id=None, page=None, page_size=None, parent_id=None, sort=None, target=None, task_id=None, **kwargs )

Method returns a paginated list of quality reports

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'job_id', 'created_date', 'gt_last_updated', 'target_last_updated', 'parent_id']. (optional)
    job_id = 1 # int | A simple equality filter for the job_id field (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    parent_id = 1 # int | A simple equality filter for the parent_id field (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id', 'job_id', 'created_date', 'gt_last_updated', 'target_last_updated', 'parent_id'] (optional)
    target = "target_example" # str | A simple equality filter for target (optional)
    task_id = 1 # int | A simple equality filter for task id (optional)

    try:
        (data, response) = api_client.quality_api.list_reports(
            x_organization=x_organization,
            filter=filter,
            job_id=job_id,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            parent_id=parent_id,
            sort=sort,
            target=target,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_reports(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ‘job_id’, ‘created_date’, ‘gt_last_updated’, ‘target_last_updated’, ‘parent_id’]. [optional]
job_id int A simple equality filter for the job_id field [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
parent_id int A simple equality filter for the parent_id field [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’, ‘job_id’, ‘created_date’, ‘gt_last_updated’, ‘target_last_updated’, ‘parent_id’] [optional]
target str A simple equality filter for target [optional]
task_id int A simple equality filter for task id [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedQualityReportList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

list_settings

list_settings( x_organization=None, filter=None, org=None, org_id=None, page=None, page_size=None, sort=None, task_id=None, **kwargs )

Method returns a paginated list of quality settings instances

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'task_id']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['id'] (optional)
    task_id = 1 # int | A simple equality filter for the task_id field (optional)

    try:
        (data, response) = api_client.quality_api.list_settings(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            page=page,
            page_size=page_size,
            sort=sort,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.list_settings(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘id’, ‘task_id’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘id’] [optional]
task_id int A simple equality filter for the task_id field [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedQualitySettingsList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update_settings

partial_update_settings( id, patched_quality_settings_request=None, **kwargs )

Methods does a partial update of chosen fields in the quality settings instance

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | An id of a quality settings instance
    patched_quality_settings_request = PatchedQualitySettingsRequest(
        iou_threshold=3.14,
        oks_sigma=3.14,
        line_thickness=3.14,
        low_overlap_threshold=3.14,
        compare_line_orientation=True,
        line_orientation_threshold=3.14,
        compare_groups=True,
        group_match_threshold=3.14,
        check_covered_annotations=True,
        object_visibility_threshold=3.14,
        panoptic_comparison=True,
        compare_attributes=True,
    ) # PatchedQualitySettingsRequest |  (optional)

    try:
        (data, response) = api_client.quality_api.partial_update_settings(
            id,
            patched_quality_settings_request=patched_quality_settings_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.partial_update_settings(): %s\n" % e)

Parameters

Name Type Description Notes
id int An id of a quality settings instance
patched_quality_settings_request PatchedQualitySettingsRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualitySettings, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_report

retrieve_report( id, **kwargs )

Method returns details of a quality report

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this quality report.

    try:
        (data, response) = api_client.quality_api.retrieve_report(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_report(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this quality report.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualityReport, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_report_data

retrieve_report_data( id, **kwargs )

Retrieve full contents of the report in JSON format

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this quality report.

    try:
        (data, response) = api_client.quality_api.retrieve_report_data(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_report_data(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this quality report.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[typing.Dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_settings

retrieve_settings( id, **kwargs )

Method returns details of the quality settings instance

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | An id of a quality settings instance

    try:
        (data, response) = api_client.quality_api.retrieve_settings(
            id,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling QualityApi.retrieve_settings(): %s\n" % e)

Parameters

Name Type Description Notes
id int An id of a quality settings instance

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[QualitySettings, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

17 - SchemaApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
retrieve GET /api/schema/

retrieve

retrieve( lang=None, scheme=None, **kwargs )

OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    lang = "af" # str |  (optional)
    scheme = "json" # str |  (optional)

    try:
        (data, response) = api_client.schema_api.retrieve(
            lang=lang,
            scheme=scheme,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling SchemaApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
lang str [optional]
scheme str [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[typing.Dict[str, typing.Union[typing.Any, none_type]], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.oai.openapi, application/yaml, application/vnd.oai.openapi+json, application/json

HTTP response details

Status code Description Response headers
200 -

18 - ServerApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
list_share GET /api/server/share Returns all files and folders that are on the server along specified path
retrieve_about GET /api/server/about Method provides basic CVAT information
retrieve_annotation_formats GET /api/server/annotation/formats Method provides the list of supported annotations formats
retrieve_plugins GET /api/server/plugins Method provides allowed plugins

list_share

list_share( directory=None, search=None, **kwargs )

Returns all files and folders that are on the server along specified path

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    directory = "directory_example" # str | Directory to browse (optional)
    search = "search_example" # str | Search for specific files (optional)

    try:
        (data, response) = api_client.server_api.list_share(
            directory=directory,
            search=search,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.list_share(): %s\n" % e)

Parameters

Name Type Description Notes
directory str Directory to browse [optional]
search str Search for specific files [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[typing.List[FileInfo], urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_about

retrieve_about( **kwargs )

Method provides basic CVAT information

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_about()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_about(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[About, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_annotation_formats

retrieve_annotation_formats( **kwargs )

Method provides the list of supported annotations formats

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_annotation_formats()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_annotation_formats(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DatasetFormats, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

retrieve_plugins

retrieve_plugins( **kwargs )

Method provides allowed plugins

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:

    try:
        (data, response) = api_client.server_api.retrieve_plugins()
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling ServerApi.retrieve_plugins(): %s\n" % e)

Parameters

This endpoint does not need any parameter.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[Plugins, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

19 - TasksApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
jobs_partial_update_data_meta PATCH /api/jobs/{id}/data/meta Method provides a meta information about media files which are related with the job
create POST /api/tasks Method creates a new task in a database without any attached images and videos
create_annotations POST /api/tasks/{id}/annotations/ Method allows to initialize the process of upload task annotations from a local or a cloud storage file
create_backup POST /api/tasks/backup/ Method recreates a task from an attached task backup file
create_data POST /api/tasks/{id}/data/ Method permanently attaches data (images, video, etc.) to a task
destroy DELETE /api/tasks/{id} Method deletes a specific task, all attached jobs, annotations, and data
destroy_annotations DELETE /api/tasks/{id}/annotations/ Method deletes all annotations for a specific task
list GET /api/tasks Returns a paginated list of tasks
partial_update PATCH /api/tasks/{id} Methods does a partial update of chosen fields in a task
partial_update_annotations PATCH /api/tasks/{id}/annotations/ Method performs a partial update of annotations in a specific task
partial_update_data_meta PATCH /api/tasks/{id}/data/meta Method provides a meta information about media files which are related with the task
retrieve GET /api/tasks/{id} Method returns details of a specific task
retrieve_annotations GET /api/tasks/{id}/annotations/ Method allows to download task annotations
retrieve_backup GET /api/tasks/{id}/backup Method backup a specified task
retrieve_data GET /api/tasks/{id}/data/ Method returns data for a specific task
retrieve_data_meta GET /api/tasks/{id}/data/meta Method provides a meta information about media files which are related with the task
retrieve_dataset GET /api/tasks/{id}/dataset Export task as a dataset in a specific format
retrieve_preview GET /api/tasks/{id}/preview Method returns a preview image for the task
retrieve_status GET /api/tasks/{id}/status When task is being created the method returns information about a status of the creation process
update_annotations PUT /api/tasks/{id}/annotations/ Method allows to upload task annotations or edit existing annotations

jobs_partial_update_data_meta

jobs_partial_update_data_meta( id, patched_data_meta_write_request=None, **kwargs )

Method provides a meta information about media files which are related with the job

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    patched_data_meta_write_request = PatchedDataMetaWriteRequest(
        deleted_frames=[
            0,
        ],
    ) # PatchedDataMetaWriteRequest |  (optional)

    try:
        (data, response) = api_client.tasks_api.jobs_partial_update_data_meta(
            id,
            patched_data_meta_write_request=patched_data_meta_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.jobs_partial_update_data_meta(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this job.
patched_data_meta_write_request PatchedDataMetaWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[DataMetaRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

create

create( task_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Method creates a new task in a database without any attached images and videos

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    task_write_request = TaskWriteRequest(
        name="name_example",
        project_id=1,
        owner_id=1,
        assignee_id=1,
        bug_tracker="bug_tracker_example",
        overlap=0,
        segment_size=0,
        labels=[
            PatchedLabelRequest(
                id=1,
                name="name_example",
                color="color_example",
                attributes=[
                    AttributeRequest(
                        name="name_example",
                        mutable=True,
                        input_type=InputTypeEnum("checkbox"),
                        default_value="default_value_example",
                        values=[
                            "values_example",
                        ],
                    ),
                ],
                deleted=True,
                type="type_example",
                svg="svg_example",
                sublabels=[
                    SublabelRequest(
                        id=1,
                        name="name_example",
                        color="color_example",
                        attributes=[
                            AttributeRequest(
                                name="name_example",
                                mutable=True,
                                input_type=InputTypeEnum("checkbox"),
                                default_value="default_value_example",
                                values=[
                                    "values_example",
                                ],
                            ),
                        ],
                        type="type_example",
                        has_parent=True,
                    ),
                ],
            ),
        ],
        subset="subset_example",
        target_storage=PatchedTaskWriteRequestTargetStorage(None),
        source_storage=PatchedTaskWriteRequestTargetStorage(None),
    ) # TaskWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.tasks_api.create(
            task_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
task_write_request TaskWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[TaskRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

create_annotations

create_annotations( id, cloud_storage_id=None, filename=None, format=None, location=None, use_default_location=None, task_annotations_write_request=None, **kwargs )

Method allows to initialize the process of upload task annotations from a local or a cloud storage file

The request POST /api/tasks/id/annotations will initiate file upload and will create the rq job on the server in which the process of annotations uploading from file will be carried out. Please, use the PUT /api/tasks/id/annotations endpoint for checking status of the process.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Annotation file name (optional)
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    location = "cloud_storage" # str | where to import the annotation from (optional)
    use_default_location = True # bool | Use the location that was configured in task to import annotations (optional) if omitted the server will use the default value of True
    task_annotations_write_request = TaskAnnotationsWriteRequest(None) # TaskAnnotationsWriteRequest |  (optional)

    try:
        api_client.tasks_api.create_annotations(
            id,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
            task_annotations_write_request=task_annotations_write_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_annotations(): %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this task.
cloud_storage_id int Storage id [optional]
filename str Annotation file name [optional]
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
location str where to import the annotation from [optional]
use_default_location bool Use the location that was configured in task to import annotations [optional] if omitted the server will use the default value of True
task_annotations_write_request TaskAnnotationsWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 Uploading has finished -
202 Uploading has been started -
405 Format is not available -

create_backup

create_backup( x_organization=None, cloud_storage_id=None, filename=None, location=None, org=None, org_id=None, rq_id=None, task_file_request=None, **kwargs )

Method recreates a task from an attached task backup file

The backup import process is as follows: The first request POST /api/tasks/backup will initiate file upload and will create the rq job on the server in which the process of a task creating from an uploaded backup will be carried out. After initiating the backup upload, you will receive an rq_id parameter. Make sure to include this parameter as a query parameter in your subsequent requests to track the status of the task creation. Once the task has been successfully created, the server will return the id of the newly created task.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    cloud_storage_id = 1 # int | Storage id (optional)
    filename = "filename_example" # str | Backup file name (optional)
    location = "local" # str | Where to import the backup file from (optional) if omitted the server will use the default value of "local"
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    rq_id = "rq_id_example" # str | rq id (optional)
    task_file_request = TaskFileRequest(
        task_file=open('/path/to/file', 'rb'),
    ) # TaskFileRequest |  (optional)

    try:
        api_client.tasks_api.create_backup(
            x_organization=x_organization,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            location=location,
            org=org,
            org_id=org_id,
            rq_id=rq_id,
            task_file_request=task_file_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling TasksApi.create_backup(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
cloud_storage_id int Storage id [optional]
filename str Backup file name [optional]
location str Where to import the backup file from [optional] if omitted the server will use the default value of “local”
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
rq_id str rq id [optional]
task_file_request TaskFileRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 The task has been imported -
202 Importing a backup file has been started -

create_data

create_data( id, upload_finish=None, upload_multiple=None, upload_start=None, data_request=None, **kwargs )

Method permanently attaches data (images, video, etc.) to a task

Allows to upload data 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://opencv.github.io/cvat/docs/manual/advanced/dataset_manifest/ After all data is sent, the operation status can be retrieved via the /status endpoint.

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this task.
    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,
        size=0,
        image_quality=0,
        start_frame=0,
        stop_frame=0,
        frame_filter="frame_filter_example",
        compressed_chunk_type=ChunkType("video"),
        original_chunk_type=ChunkType("video"),
        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",
        ],
    ) # DataRequest |  (optional)

    try:
        api_client.tasks_api.create_data(
            id,