RequestsApi class reference

All URIs are relative tohttp://localhost

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

create_cancel

create_cancel(id,**kwargs)

Cancel request

Example

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

Parameters

NameTypeDescriptionNotes
idstr

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

Returned values

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

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

This endpoint does not have any return value, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200The request has been cancelled-

list

list(action=None,filter=None,format=None,job_id=None,org=None,page=None,page_size=None,project_id=None,sort=None,status=None,subresource=None,target=None,task_id=None,**kwargs)

List requests

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:action="action_example"# str | A simple equality filter for the action field (optional)filter="filter_example"# str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['status', 'project_id', 'task_id', 'job_id', 'action', 'target', 'subresource', 'format']. (optional)format="format_example"# str | A simple equality filter for the format field (optional)job_id=1# int | A simple equality filter for the job_id field (optional)org="org_example"# str | A simple equality filter for the org field (optional)page=1# int | A page number within the paginated result set. (optional)page_size=1# int | Number of results to return per page. (optional)project_id=1# int | A simple equality filter for the project_id field (optional)sort="sort_example"# str | Which field to use when ordering the results. Available ordering_fields: ['created_date', 'status', 'action'] (optional)status="queued"# str | A simple equality filter for the status field (optional)subresource="subresource_example"# str | A simple equality filter for the subresource field (optional)target="target_example"# str | A simple equality filter for the target field (optional)task_id=1# int | A simple equality filter for the task_id field (optional)try:(data,response)=api_client.requests_api.list(action=action,filter=filter,format=format,job_id=job_id,org=org,page=page,page_size=page_size,project_id=project_id,sort=sort,status=status,subresource=subresource,target=target,task_id=task_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling RequestsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
actionstrA simple equality filter for the action field[optional]
filterstrJSON Logic filter. This filter can be used to perform complex filtering by grouping rules. Details about the syntax used can be found at the link:https://jsonlogic.com/ Available filter_fields: [‘status’, ‘project_id’, ’task_id’, ‘job_id’, ‘action’, ’target’, ‘subresource’, ‘format’].[optional]
formatstrA simple equality filter for the format field[optional]
job_idintA simple equality filter for the job_id field[optional]
orgstrA simple equality filter for the org field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
project_idintA simple equality filter for the project_id field[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘created_date’, ‘status’, ‘action’][optional]
statusstrA simple equality filter for the status field[optional]
subresourcestrA simple equality filter for the subresource field[optional]
targetstrA simple equality filter for the target field[optional]
task_idintA simple equality filter for the task_id field[optional]

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

Returned values

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

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

The first value is a model parsed from the response data.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get request details

Example

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

Parameters

NameTypeDescriptionNotes
idstr

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

Returned values

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

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

The first value is a model parsed from the response data.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-