GuidesApi class reference
All URIs are relative tohttp://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
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: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)exceptexceptions.ApiExceptionase: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 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 code | Description | Response headers |
---|---|---|
201 | - |
destroy
destroy(id,**kwargs)
Delete an annotation guide
This also deletes all assets attached to the guide.
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 annotation guide.try:api_client.guides_api.destroy(id,)exceptexceptions.ApiExceptionase: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, 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 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
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 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)exceptexceptions.ApiExceptionase: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 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 code | Description | Response headers |
---|---|---|
200 | - |
retrieve
retrieve(id,**kwargs)
Get annotation guide 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 annotation guide.try:(data,response)=api_client.guides_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase: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 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 code | Description | Response headers |
---|---|---|
200 | - |