Skip to content

Latest commit

 

History

History
660 lines (460 loc) · 24.1 KB

WebhooksApi.md

File metadata and controls

660 lines (460 loc) · 24.1 KB

openapi_client.WebhooksApi

All URIs are relative to /api/v2

Method HTTP request Description
add_data_to_webhook POST /webhooks/data/{webhook_uri} Add data to webhook
add_data_to_webhook_using_get_method GET /webhooks/data/{webhook_uri} Add data to the webhook
create_a_webhook POST /workspaces/{workspace_id}/projects/{project_id}/webhooks Create a webhook
delete_webhook DELETE /workspaces/{workspace_id}/projects/{project_id}/webhooks/{webhook_id} Delete webhook
get_webhook_details GET /workspaces/{workspace_id}/projects/{project_id}/webhooks/{webhook_id} Get webhook details
list_webhooks GET /workspaces/{workspace_id}/projects/{project_id}/webhooks List webhooks
update_webhook_configurations PATCH /workspaces/{workspace_id}/projects/{project_id}/webhooks/{webhook_id} Updates the webhook

add_data_to_webhook

object add_data_to_webhook(webhook_uri)

Add data to webhook

Add data webhook dataset. Query parameters can be used to optimize the response.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    webhook_uri = '4' # str | API key of the webhook (default to '4')

    try:
        # Add data to webhook
        api_response = api_instance.add_data_to_webhook(webhook_uri)
        print("The response of WebhooksApi->add_data_to_webhook:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->add_data_to_webhook: %s\n" % e)

Parameters

Name Type Description Notes
webhook_uri str API key of the webhook [default to '4']

Return type

object

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Document created, URL follows -
400 Bad request syntax or unsupported method -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

add_data_to_webhook_using_get_method

add_data_to_webhook_using_get_method(webhook_uri)

Add data to the webhook

Add data to the webhook.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    webhook_uri = '4' # str | API key of the webhook (default to '4')

    try:
        # Add data to the webhook
        api_instance.add_data_to_webhook_using_get_method(webhook_uri)
    except Exception as e:
        print("Exception when calling WebhooksApi->add_data_to_webhook_using_get_method: %s\n" % e)

Parameters

Name Type Description Notes
webhook_uri str API key of the webhook [default to '4']

Return type

void (empty response body)

Authorization

apiKey, apiSecret

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -
401 Authorization error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_a_webhook

WebhookDetails create_a_webhook(workspace_id, project_id, webhook_spec)

Create a webhook

Create a webhook dataset.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.models.webhook_details import WebhookDetails
from openapi_client.models.webhook_spec import WebhookSpec
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    workspace_id = 4 # int | Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. (default to 4)
    project_id = 4 # int | Project ID of the workspace (default to 4)
    webhook_spec = openapi_client.WebhookSpec() # WebhookSpec | 

    try:
        # Create a webhook
        api_response = api_instance.create_a_webhook(workspace_id, project_id, webhook_spec)
        print("The response of WebhooksApi->create_a_webhook:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->create_a_webhook: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id int Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. [default to 4]
project_id int Project ID of the workspace [default to 4]
webhook_spec WebhookSpec

Return type

WebhookDetails

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Document created, URL follows -
400 Bad request syntax or unsupported method -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_webhook

delete_webhook(workspace_id, project_id, webhook_id)

Delete webhook

Deletes given webhook.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    workspace_id = 4 # int | Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. (default to 4)
    project_id = 4 # int | Project ID of the workspace (default to 4)
    webhook_id = 4 # int | ID of the webhook (default to 4)

    try:
        # Delete webhook
        api_instance.delete_webhook(workspace_id, project_id, webhook_id)
    except Exception as e:
        print("Exception when calling WebhooksApi->delete_webhook: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id int Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. [default to 4]
project_id int Project ID of the workspace [default to 4]
webhook_id int ID of the webhook [default to 4]

Return type

void (empty response body)

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Request fulfilled, nothing follows -
400 Bad request syntax or unsupported method -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_webhook_details

WebhookDetails get_webhook_details(workspace_id, project_id, webhook_id, fields=fields)

Get webhook details

Returns webhook details. Query parameters can be used to optimize the response.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.models.webhook_details import WebhookDetails
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    workspace_id = 4 # int | Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. (default to 4)
    project_id = 4 # int | Project ID of the workspace (default to 4)
    webhook_id = 4 # int | ID of the webhook (default to 4)
    fields = '__standard' # str | Fields to be returned in a comma-separated format may include id, name, ds_id, url. (optional) (default to '__standard')

    try:
        # Get webhook details
        api_response = api_instance.get_webhook_details(workspace_id, project_id, webhook_id, fields=fields)
        print("The response of WebhooksApi->get_webhook_details:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->get_webhook_details: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id int Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. [default to 4]
project_id int Project ID of the workspace [default to 4]
webhook_id int ID of the webhook [default to 4]
fields str Fields to be returned in a comma-separated format may include id, name, ds_id, url. [optional] [default to '__standard']

Return type

WebhookDetails

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Get webhook details -
400 Bad Request -
401 Authorization error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_webhooks

WebhooksList list_webhooks(workspace_id, project_id, fields=fields, id=id, name=name, ds_id=ds_id, mode=mode, limit=limit, offset=offset, sort=sort)

List webhooks

Returns list of webhook details. Query parameters can be used to optimize the response.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.models.webhooks_list import WebhooksList
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    workspace_id = 4 # int | Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. (default to 4)
    project_id = 4 # int | Project ID of the workspace (default to 4)
    fields = '__standard' # str | Fields to be returned in a comma-separated format may include id, name, ds_id, url. (optional) (default to '__standard')
    id = '' # str | Track multiple webhook ids, comma separated (optional) (default to '')
    name = '' # str | Track multiple webhook names, comma separated (optional) (default to '')
    ds_id = '' # str | Track multiple webhook ds ids, comma separated (optional) (default to '')
    mode = '' # str | Track multiple webhook modes, comma separated (optional) (default to '')
    limit = 10 # int | Max number of result to return (optional) (default to 10)
    offset = 0 # int | Distance from the beginning of the list of results (optional) (default to 0)
    sort = '(id:asc)' # str | Sort the webhooks based on the fields (optional) (default to '(id:asc)')

    try:
        # List webhooks
        api_response = api_instance.list_webhooks(workspace_id, project_id, fields=fields, id=id, name=name, ds_id=ds_id, mode=mode, limit=limit, offset=offset, sort=sort)
        print("The response of WebhooksApi->list_webhooks:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->list_webhooks: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id int Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. [default to 4]
project_id int Project ID of the workspace [default to 4]
fields str Fields to be returned in a comma-separated format may include id, name, ds_id, url. [optional] [default to '__standard']
id str Track multiple webhook ids, comma separated [optional] [default to '']
name str Track multiple webhook names, comma separated [optional] [default to '']
ds_id str Track multiple webhook ds ids, comma separated [optional] [default to '']
mode str Track multiple webhook modes, comma separated [optional] [default to '']
limit int Max number of result to return [optional] [default to 10]
offset int Distance from the beginning of the list of results [optional] [default to 0]
sort str Sort the webhooks based on the fields [optional] [default to '(id:asc)']

Return type

WebhooksList

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List webhooks -
400 Bad Request -
401 Authorization error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_webhook_configurations

WebhookDetails update_webhook_configurations(workspace_id, project_id, webhook_id, webhook_patch_request)

Updates the webhook

Updates the webhook with given information.

Example

  • Api Key Authentication (apiKey):
  • Api Key Authentication (apiSecret):
import openapi_client
from openapi_client.models.webhook_details import WebhookDetails
from openapi_client.models.webhook_patch_request import WebhookPatchRequest
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "/api/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Configure API key authorization: apiSecret
configuration.api_key['apiSecret'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiSecret'] = 'Bearer'

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.WebhooksApi(api_client)
    workspace_id = 4 # int | Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. (default to 4)
    project_id = 4 # int | Project ID of the workspace (default to 4)
    webhook_id = 4 # int | ID of the webhook (default to 4)
    webhook_patch_request = openapi_client.WebhookPatchRequest() # WebhookPatchRequest | 

    try:
        # Updates the webhook
        api_response = api_instance.update_webhook_configurations(workspace_id, project_id, webhook_id, webhook_patch_request)
        print("The response of WebhooksApi->update_webhook_configurations:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->update_webhook_configurations: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id int Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace. [default to 4]
project_id int Project ID of the workspace [default to 4]
webhook_id int ID of the webhook [default to 4]
webhook_patch_request WebhookPatchRequest

Return type

WebhookDetails

Authorization

apiKey, apiSecret

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Request fulfilled, document follows -
400 Bad request syntax or unsupported method -

[Back to top] [Back to API list] [Back to Model list] [Back to README]