WebhooksApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
createPOST /api/webhooksCreate a webhook
create_deliveries_redeliveryPOST /api/webhooks/{id}/deliveries/{delivery_id}/redeliveryRedeliver a webhook delivery
create_pingPOST /api/webhooks/{id}/pingSend a ping webhook
destroyDELETE /api/webhooks/{id}Delete a webhook
listGET /api/webhooksList webhooks
list_deliveriesGET /api/webhooks/{id}/deliveriesList deliveries for a webhook
partial_updatePATCH /api/webhooks/{id}Update a webhook
retrieveGET /api/webhooks/{id}Get webhook details
retrieve_deliveriesGET /api/webhooks/{id}/deliveries/{delivery_id}Get details of a webhook delivery
retrieve_eventsGET /api/webhooks/eventsList available webhook events
updatePUT /api/webhooks/{id}Replace a webhook

create

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

Create a webhook

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:webhook_write_request=WebhookWriteRequest(target_url="target_url_example",description="description_example",type=WebhookType("organization"),content_type=WebhookContentType("application/json"),secret="secret_example",is_active=True,enable_ssl=True,project_id=1,events=[EventsEnum("create:comment"),],)# WebhookWriteRequest |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.webhooks_api.create(webhook_write_request,x_organization=x_organization,org=org,org_id=org_id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
webhook_write_requestWebhookWriteRequest
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[WebhookRead, 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
201-

create_deliveries_redelivery

create_deliveries_redelivery(delivery_id,id,**kwargs)

Redeliver a webhook delivery

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:delivery_id="4"# str |id=1# int | A unique integer value identifying this webhook.try:api_client.webhooks_api.create_deliveries_redelivery(delivery_id,id,)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create_deliveries_redelivery():%s\n"%e)

Parameters

NameTypeDescriptionNotes
delivery_idstr
idintA unique integer value identifying this webhook.

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
200No response body-

create_ping

create_ping(id,**kwargs)

Send a ping webhook

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 webhook.try:(data,response)=api_client.webhooks_api.create_ping(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.create_ping():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.

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

Returned values

Returned type:Tuple[WebhookDeliveryRead, 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-

destroy

destroy(id,**kwargs)

Delete a webhook

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 webhook.try:api_client.webhooks_api.destroy(id,)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.

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 webhook has been deleted-

list

list(x_organization=None,filter=None,org=None,org_id=None,owner=None,page=None,page_size=None,project_id=None,search=None,sort=None,target_url=None,type=None,**kwargs)

List webhooks

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: ['target_url', 'owner', 'type', 'description', 'id', 'project_id', 'updated_date']. (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)project_id=1# int | A simple equality filter for the project_id field (optional)search="search_example"# str | A search term. Available search_fields: ('target_url', 'owner', 'type', 'description') (optional)sort="sort_example"# str | Which field to use when ordering the results. Available ordering_fields: ['target_url', 'owner', 'type', 'description', 'id', 'project_id', 'updated_date'] (optional)target_url="target_url_example"# str | A simple equality filter for the target_url field (optional)type="organization"# str | A simple equality filter for the type field (optional)try:(data,response)=api_client.webhooks_api.list(x_organization=x_organization,filter=filter,org=org,org_id=org_id,owner=owner,page=page,page_size=page_size,project_id=project_id,search=search,sort=sort,target_url=target_url,type=type,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.list():%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: [’target_url’, ‘owner’, ’type’, ‘description’, ‘id’, ‘project_id’, ‘updated_date’].[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]
project_idintA simple equality filter for the project_id field[optional]
searchstrA search term. Available search_fields: (’target_url’, ‘owner’, ’type’, ‘description’)[optional]
sortstrWhich field to use when ordering the results. Available ordering_fields: [’target_url’, ‘owner’, ’type’, ‘description’, ‘id’, ‘project_id’, ‘updated_date’][optional]
target_urlstrA simple equality filter for the target_url field[optional]
typestrA simple equality filter for the type field[optional]

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

Returned values

Returned type:Tuple[PaginatedWebhookReadList, 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-

list_deliveries

list_deliveries(id,page=None,page_size=None,**kwargs)

List deliveries for a webhook

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 webhook.page=1# int | A page number within the paginated result set. (optional)page_size=1# int | Number of results to return per page. (optional)try:(data,response)=api_client.webhooks_api.list_deliveries(id,page=page,page_size=page_size,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.list_deliveries():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]

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

Returned values

Returned type:Tuple[PaginatedWebhookDeliveryReadList, 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_webhook_write_request=None,**kwargs)

Update a webhook

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 webhook.patched_webhook_write_request=PatchedWebhookWriteRequest(target_url="target_url_example",description="description_example",content_type=WebhookContentType("application/json"),secret="secret_example",is_active=True,enable_ssl=True,events=[EventsEnum("create:comment"),],)# PatchedWebhookWriteRequest |  (optional)try:(data,response)=api_client.webhooks_api.partial_update(id,patched_webhook_write_request=patched_webhook_write_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
patched_webhook_write_requestPatchedWebhookWriteRequest[optional]

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

Returned values

Returned type:Tuple[WebhookRead, 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

retrieve(id,**kwargs)

Get webhook 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 webhook.try:(data,response)=api_client.webhooks_api.retrieve(id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.

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

Returned values

Returned type:Tuple[WebhookRead, 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_deliveries

retrieve_deliveries(delivery_id,id,**kwargs)

Get details of a webhook delivery

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:delivery_id="4"# str |id=1# int | A unique integer value identifying this webhook.try:(data,response)=api_client.webhooks_api.retrieve_deliveries(delivery_id,id,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve_deliveries():%s\n"%e)

Parameters

NameTypeDescriptionNotes
delivery_idstr
idintA unique integer value identifying this webhook.

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

Returned values

Returned type:Tuple[WebhookDeliveryRead, 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_events

retrieve_events(type=None,**kwargs)

List available webhook events

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:type="type_example"# str | Type of webhook (optional)try:(data,response)=api_client.webhooks_api.retrieve_events(type=type,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.retrieve_events():%s\n"%e)

Parameters

NameTypeDescriptionNotes
typestrType of webhook[optional]

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

Returned values

Returned type:Tuple[Events, 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-

update

update(id,webhook_write_request,**kwargs)

Replace a webhook

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 webhook.webhook_write_request=WebhookWriteRequest(target_url="target_url_example",description="description_example",type=WebhookType("organization"),content_type=WebhookContentType("application/json"),secret="secret_example",is_active=True,enable_ssl=True,project_id=1,events=[EventsEnum("create:comment"),],)# WebhookWriteRequest |try:(data,response)=api_client.webhooks_api.update(id,webhook_write_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling WebhooksApi.update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
idintA unique integer value identifying this webhook.
webhook_write_requestWebhookWriteRequest

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

Returned values

Returned type:Tuple[WebhookRead, 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-