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 |
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, backup_write_request=None, **kwargs )
Methods create a project from a backup
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 = 3.14 # float | 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)
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,
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 | float | 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] |
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: Not defined
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
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 = 3.14 # float | 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:
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,
)
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 | float | 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[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 |
---|---|---|
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 | A filter term. 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 | A filter term. 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 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 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 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 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 = 3.14 # float | 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 | float | 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, use_default_location=None, **kwargs )
Export project 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:
id = 1 # int | A unique integer value identifying this project.
action = "download" # str | Used to start downloading process after annotation file had been created (optional)
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 dataset (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,
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 after annotation file had been created | [optional] |
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 dataset | [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 | - |