JobsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_annotations POST /api/jobs/{id}/annotations/ Method allows to upload job 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

create_annotations

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

Method allows to upload job annotations

Example

from pprint import pprint

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

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

with ApiClient(configuration) as api_client:
    id = 1 # int | A unique integer value identifying this job.
    annotation_file_request = AnnotationFileRequest(
        annotation_file=open('/path/to/file', 'rb'),
    ) # AnnotationFileRequest | 
    cloud_storage_id = 3.14 # float | 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

    try:
        api_client.jobs_api.create_annotations(
            id,
            annotation_file_request,
            cloud_storage_id=cloud_storage_id,
            filename=filename,
            format=format,
            location=location,
            use_default_location=use_default_location,
        )
    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.
annotation_file_request AnnotationFileRequest
cloud_storage_id float 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

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 -

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, **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 | A filter term. Available filter_fields: ['task_name', 'project_name', 'assignee', 'state', 'stage', 'id', 'task_id', 'project_id', 'updated_date', 'dimension'] (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'] (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)

    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,
        )
        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 A filter term. Available filter_fields: [‘task_name’, ‘project_name’, ‘assignee’, ‘state’, ‘stage’, ‘id’, ‘task_id’, ‘project_id’, ‘updated_date’, ‘dimension’] [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’] [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]

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 after annotation file had been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 3.14 # float | 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 after annotation file had been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id float 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 after annotation file had been created (optional) if omitted the server will use the default value of "download"
    cloud_storage_id = 3.14 # float | 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 after annotation file had been created [optional] if omitted the server will use the default value of “download”
cloud_storage_id float 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, format=None, job_annotations_update_request=None, **kwargs )

Method performs an update of all 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:
    id = 1 # int | A unique integer value identifying this job.
    format = "format_example" # str | Input format name You can get the list of supported formats at: /server/annotation/formats (optional)
    job_annotations_update_request = JobAnnotationsUpdateRequest(None) # JobAnnotationsUpdateRequest |  (optional)

    try:
        api_client.jobs_api.update_annotations(
            id,
            format=format,
            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.
format str Input format name You can get the list of supported formats at: /server/annotation/formats [optional]
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 -