Skip to content

Latest commit

 

History

History
216 lines (139 loc) · 8.99 KB

README.md

File metadata and controls

216 lines (139 loc) · 8.99 KB

Webhooks

(webhooks)

Available Operations

list

List webhooks

Example Usage

from panora_sdk import Panora

s = Panora(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.webhooks.list()

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

List[models.WebhookResponse]

Errors

Error Object Status Code Content Type
models.SDKError 4xx-5xx /

create

Create webhook

Example Usage

from panora_sdk import Panora

s = Panora(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.webhooks.create(request={
    "url": "https://acme.com/webhook_receiver",
    "scope": [
        "connection.created",
    ],
    "description": "Webhook to receive connection events",
})

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request models.WebhookDto ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.WebhookResponse

Errors

Error Object Status Code Content Type
models.SDKError 4xx-5xx /

delete

Delete Webhook

Example Usage

from panora_sdk import Panora

s = Panora(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.webhooks.delete(id="801f9ede-c698-4e66-a7fc-48d19eebaa4f")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
id str ✔️ id of the webhook to delete. 801f9ede-c698-4e66-a7fc-48d19eebaa4f
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.WebhookResponse

Errors

Error Object Status Code Content Type
models.SDKError 4xx-5xx /

update_status

Update webhook status

Example Usage

from panora_sdk import Panora

s = Panora(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.webhooks.update_status(id="801f9ede-c698-4e66-a7fc-48d19eebaa4f")

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description Example
id str ✔️ id of the webhook to update. 801f9ede-c698-4e66-a7fc-48d19eebaa4f
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.WebhookResponse

Errors

Error Object Status Code Content Type
models.SDKError 4xx-5xx /

verify_event

Verify payload signature of the webhook

Example Usage

from panora_sdk import Panora

s = Panora(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.webhooks.verify_event(request={
    "payload": {
        "key": "<value>",
    },
    "signature": "<value>",
    "secret": "<value>",
})

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request models.SignatureVerificationDto ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

Dict[str, Any]

Errors

Error Object Status Code Content Type
models.SDKError 4xx-5xx /