GuidesApi class reference
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
create | POST /api/guides | Create an annotation guide |
destroy | DELETE /api/guides/{id} | Delete an annotation guide |
partial_update | PATCH /api/guides/{id} | Update an annotation guide |
retrieve | GET /api/guides/{id} | Get annotation guide details |
create
create( annotation_guide_write_request=None, **kwargs )
Create an annotation guide
The new guide will be bound either to a project or a task, depending on parameters.
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:
annotation_guide_write_request = AnnotationGuideWriteRequest(
task_id=1,
project_id=1,
markdown="markdown_example",
) # AnnotationGuideWriteRequest | (optional)
try:
(data, response) = api_client.guides_api.create(
annotation_guide_write_request=annotation_guide_write_request,
)
pprint(data)
except exceptions.ApiException as e:
print("Exception when calling GuidesApi.create(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
annotation_guide_write_request | AnnotationGuideWriteRequest | [optional] |
There are also optional kwargs that control the function invocation behavior. Read more here.
Returned values
Returned type: Tuple[AnnotationGuideRead, 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.
Authentication
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 | - |
destroy
destroy( id, **kwargs )
Delete an annotation guide
This also deletes all assets attached to the guide.
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 annotation guide.
try:
api_client.guides_api.destroy(
id,)
except exceptions.ApiException as e:
print("Exception when calling GuidesApi.destroy(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this annotation guide. |
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.
Authentication
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 guide has been deleted | - |
partial_update
partial_update( id, patched_annotation_guide_write_request=None, **kwargs )
Update an annotation guide
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 annotation guide.
patched_annotation_guide_write_request = PatchedAnnotationGuideWriteRequest(
task_id=1,
project_id=1,
markdown="markdown_example",
) # PatchedAnnotationGuideWriteRequest | (optional)
try:
(data, response) = api_client.guides_api.partial_update(
id,
patched_annotation_guide_write_request=patched_annotation_guide_write_request,
)
pprint(data)
except exceptions.ApiException as e:
print("Exception when calling GuidesApi.partial_update(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this annotation guide. | |
patched_annotation_guide_write_request | PatchedAnnotationGuideWriteRequest | [optional] |
There are also optional kwargs that control the function invocation behavior. Read more here.
Returned values
Returned type: Tuple[AnnotationGuideRead, 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.
Authentication
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 )
Get annotation guide details
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 annotation guide.
try:
(data, response) = api_client.guides_api.retrieve(
id,)
pprint(data)
except exceptions.ApiException as e:
print("Exception when calling GuidesApi.retrieve(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this annotation guide. |
There are also optional kwargs that control the function invocation behavior. Read more here.
Returned values
Returned type: Tuple[AnnotationGuideRead, 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.
Authentication
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 | - |