CloudstoragesApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/cloudstoragesCreate a cloud storage
destroyDELETE /api/cloudstorages/{id}Delete a cloud storage
listGET /api/cloudstoragesList cloud storages
partial_updatePATCH /api/cloudstorages/{id}Update a cloud storage
retrieveGET /api/cloudstorages/{id}Get cloud storage details
retrieve_actionsGET /api/cloudstorages/{id}/actionsGet allowed actions for a cloud storage
retrieve_content_v2GET /api/cloudstorages/{id}/content-v2Get cloud storage content
retrieve_previewGET /api/cloudstorages/{id}/previewGet a preview image for a cloud storage
retrieve_statusGET /api/cloudstorages/{id}/statusGet the status of a cloud storage

create

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

Create a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:cloud_storage_write_request=CloudStorageWriteRequest(provider_type=ProviderTypeEnum("AWS_S3_BUCKET"),resource="resource_example",display_name="display_name_example",owner=BasicUserRequest(username="A",first_name="first_name_example",last_name="last_name_example",),credentials_type=CredentialsTypeEnum("KEY_SECRET_KEY_PAIR"),session_token="session_token_example",account_name="account_name_example",key="key_example",secret_key="secret_key_example",connection_string="connection_string_example",key_file=open('/path/to/file','rb'),specific_attributes="specific_attributes_example",description="description_example",manifests=[],)# CloudStorageWriteRequest |x_organization="X-Organization_example"# str | Organization unique slug (optional)org="org_example"# str | Organization unique slug (optional)org_id=1# int | Organization identifier (optional)try:(data,response)=api_client.cloudstorages_api.create(cloud_storage_write_request,x_organization=x_organization,org=org,org_id=org_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
cloud_storage_write_requestCloudStorageWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

destroy

destroy(id,**kwargs)

Delete a cloud storage

Example

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

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The cloud storage has been removed-

list

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

List cloud storages

Example

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

Parameters

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

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update a cloud storage

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.patched_cloud_storage_write_request=PatchedCloudStorageWriteRequest(provider_type=ProviderTypeEnum("AWS_S3_BUCKET"),resource="resource_example",display_name="display_name_example",owner=BasicUserRequest(username="A",first_name="first_name_example",last_name="last_name_example",),credentials_type=CredentialsTypeEnum("KEY_SECRET_KEY_PAIR"),session_token="session_token_example",account_name="account_name_example",key="key_example",secret_key="secret_key_example",connection_string="connection_string_example",key_file=open('/path/to/file','rb'),specific_attributes="specific_attributes_example",description="description_example",manifests=[],)# PatchedCloudStorageWriteRequest |  (optional)try:(data,response)=api_client.cloudstorages_api.partial_update(id,patched_cloud_storage_write_request=patched_cloud_storage_write_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.
patched_cloud_storage_write_requestPatchedCloudStorageWriteRequest[optional]

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve

retrieve(id,**kwargs)

Get cloud storage details

Example

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

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

retrieve_actions

retrieve_actions(id,**kwargs)

Get allowed actions for a cloud storage

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

Example

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

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Cloud Storage actions (GETPUT

retrieve_content_v2

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

Get cloud storage content

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:id=1# int | A unique integer value identifying this cloud storage.manifest_path="manifest_path_example"# str | Path to the manifest file in a cloud storage (optional)next_token="next_token_example"# str | Used to continue listing files in the bucket (optional)page_size=1# int |  (optional)prefix="prefix_example"# str | Prefix to filter data (optional)try:(data,response)=api_client.cloudstorages_api.retrieve_content_v2(id,manifest_path=manifest_path,next_token=next_token,page_size=page_size,prefix=prefix,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling CloudstoragesApi.retrieve_content_v2():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.
manifest_pathstrPath to the manifest file in a cloud storage[optional]
next_tokenstrUsed to continue listing files in the bucket[optional]
page_sizeint[optional]
prefixstrPrefix to filter data[optional]

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200A manifest content-

retrieve_preview

retrieve_preview(id,**kwargs)

Get a preview image for a cloud storage

Example

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

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

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

retrieve_status

retrieve_status(id,**kwargs)

Get the status of a cloud storage

Example

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

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this cloud storage.

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

Returned values

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

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

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

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Cloud Storage status (AVAILABLENOT_FOUND