ConsensusApi class reference

All URIs are relative tohttp://localhost

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

create_merge

create_merge(consensus_merge_create_request=None,**kwargs)

Create a consensus merge

Example

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

Parameters

NameTypeDescriptionNotes
consensus_merge_create_requestConsensusMergeCreateRequest[optional]

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

list_settings

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

List consensus settings instances

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:x_organization="X-Organization_example"# str | Organization unique slug (optional)filter="filter_example"# str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['id', 'task_id']. (optional)org="org_example"# str | Organization unique slug (optional)org_id=1# int | Organization identifier (optional)page=1# int | A page number within the paginated result set. (optional)page_size=1# int | Number of results to return per page. (optional)sort="sort_example"# str | Which field to use when ordering the results. Available ordering_fields: ['id'] (optional)task_id=1# int | A simple equality filter for the task_id field (optional)try:(data,response)=api_client.consensus_api.list_settings(x_organization=x_organization,filter=filter,org=org,org_id=org_id,page=page,page_size=page_size,sort=sort,task_id=task_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling ConsensusApi.list_settings():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link:https://jsonlogic.com/ Available filter_fields: [‘id’, ’task_id’].[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [‘id’][optional]
task_idintA simple equality filter for the task_id field[optional]

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update_settings

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

Update a consensus settings instance

Example

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

Parameters

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

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_settings

retrieve_settings(id,**kwargs)

Get consensus settings instance details

Example

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

Parameters

NameTypeDescriptionNotes
idintAn id of a consensus settings instance

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-