Skip to content

Latest commit

 

History

History
422 lines (283 loc) · 12 KB

WebhooksApi.md

File metadata and controls

422 lines (283 loc) · 12 KB

callchimp.WebhooksApi

All URIs are relative to https://api.callchimp.ai/v1

Method HTTP request Description
webhooks_delete DELETE /webhooks/{Id} Delete Webhook by Id
webhooks_get GET /webhooks/{Id} Get Webhook by Id
webhooks_list GET /webhooks List Webhooks
webhooks_post POST /webhooks Create a Webhook
webhooks_update PATCH /webhooks/{Id} Update Webhook by Id

webhooks_delete

webhooks_delete(id)

Delete Webhook by Id

Example

  • Api Key Authentication (x-api-key):
import callchimp
from callchimp.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.callchimp.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = callchimp.Configuration(
    host = "https://api.callchimp.ai/v1"
)

# 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: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

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

# Enter a context with an instance of the API client
with callchimp.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = callchimp.WebhooksApi(api_client)
    id = 56 # int | Numeric Webhook Id

    try:
        # Delete Webhook by Id
        api_instance.webhooks_delete(id)
    except Exception as e:
        print("Exception when calling WebhooksApi->webhooks_delete: %s\n" % e)

Parameters

Name Type Description Notes
id int Numeric Webhook Id

Return type

void (empty response body)

Authorization

x-api-key

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
401 -
404 -
405 -

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

webhooks_get

WebhookResponse webhooks_get(id)

Get Webhook by Id

Example

  • Api Key Authentication (x-api-key):
import callchimp
from callchimp.models.webhook_response import WebhookResponse
from callchimp.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.callchimp.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = callchimp.Configuration(
    host = "https://api.callchimp.ai/v1"
)

# 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: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

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

# Enter a context with an instance of the API client
with callchimp.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = callchimp.WebhooksApi(api_client)
    id = 56 # int | Numeric Webhook Id

    try:
        # Get Webhook by Id
        api_response = api_instance.webhooks_get(id)
        print("The response of WebhooksApi->webhooks_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->webhooks_get: %s\n" % e)

Parameters

Name Type Description Notes
id int Numeric Webhook Id

Return type

WebhookResponse

Authorization

x-api-key

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 -
404 -
405 -

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

webhooks_list

WebhookListResponse webhooks_list(page=page)

List Webhooks

Example

  • Api Key Authentication (x-api-key):
import callchimp
from callchimp.models.webhook_list_response import WebhookListResponse
from callchimp.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.callchimp.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = callchimp.Configuration(
    host = "https://api.callchimp.ai/v1"
)

# 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: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

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

# Enter a context with an instance of the API client
with callchimp.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = callchimp.WebhooksApi(api_client)
    page = 56 # int | Page Number (optional)

    try:
        # List Webhooks
        api_response = api_instance.webhooks_list(page=page)
        print("The response of WebhooksApi->webhooks_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->webhooks_list: %s\n" % e)

Parameters

Name Type Description Notes
page int Page Number [optional]

Return type

WebhookListResponse

Authorization

x-api-key

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 -
405 -

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

webhooks_post

WebhookResponse webhooks_post(webhook_request)

Create a Webhook

Example

  • Api Key Authentication (x-api-key):
import callchimp
from callchimp.models.webhook_request import WebhookRequest
from callchimp.models.webhook_response import WebhookResponse
from callchimp.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.callchimp.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = callchimp.Configuration(
    host = "https://api.callchimp.ai/v1"
)

# 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: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

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

# Enter a context with an instance of the API client
with callchimp.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = callchimp.WebhooksApi(api_client)
    webhook_request = {"campaign":539,"name":"Test Webhook krakend campaign","type":"campaign","url":"https://example.com"} # WebhookRequest | 

    try:
        # Create a Webhook
        api_response = api_instance.webhooks_post(webhook_request)
        print("The response of WebhooksApi->webhooks_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->webhooks_post: %s\n" % e)

Parameters

Name Type Description Notes
webhook_request WebhookRequest

Return type

WebhookResponse

Authorization

x-api-key

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 -
405 -

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

webhooks_update

WebhookResponse webhooks_update(id, webhook_request)

Update Webhook by Id

Example

  • Api Key Authentication (x-api-key):
import callchimp
from callchimp.models.webhook_request import WebhookRequest
from callchimp.models.webhook_response import WebhookResponse
from callchimp.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.callchimp.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = callchimp.Configuration(
    host = "https://api.callchimp.ai/v1"
)

# 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: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

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

# Enter a context with an instance of the API client
with callchimp.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = callchimp.WebhooksApi(api_client)
    id = 56 # int | Numeric Webhook Id
    webhook_request = {"type":"campaign"} # WebhookRequest | 

    try:
        # Update Webhook by Id
        api_response = api_instance.webhooks_update(id, webhook_request)
        print("The response of WebhooksApi->webhooks_update:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebhooksApi->webhooks_update: %s\n" % e)

Parameters

Name Type Description Notes
id int Numeric Webhook Id
webhook_request WebhookRequest

Return type

WebhookResponse

Authorization

x-api-key

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 -
404 -
405 -

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