pykazoo.webhooks

class pykazoo.webhooks.Webhooks(rest_request)

2600hz Kazoo Webhooks API.

Parameters:rest_request (pykazoo.restrequest.RestRequest) – The request client to use. (optional, default: pykazoo.RestRequest())
create_webhook(account_id, data)

Create a Webhook

Parameters:
  • account_id (str) – ID of Account to create Webhook for.
  • data (dict) – Kazoo Device data (see official API Docs).
Returns:

Kazoo Data (see official API docs).

Return type:

dict

delete_webhook(account_id, webhook_id)

Delete a Webhook

Parameters:
  • account_id (str) – ID of Account to delete Webhook for.
  • webhook_id (str) – ID of Webhook to delete.
Returns:

Kazoo Data (see official API docs).

Return type:

dict

get_system_webhooks(filters=None)

Get all Webhooks for the System.

Parameters:filters (dict, None) – Kazoo Filter Parameters (see official API docs).
Returns:Kazoo Data (see official API docs).
Return type:dict
get_webhook(account_id, webhook_id, filters=None)

Get a Webhook for an Account.

Parameters:
  • account_id (str) – ID of Account to get Webhook for.
  • webhook_id (str) – ID of Webhook to get.
  • filters (dict, None) – Kazoo Filter Parameters (see official API docs).
Returns:

Kazoo Data (see official API docs).

Return type:

dict

get_webhooks(account_id, filters=None)

Get all Webhooks for an Account.

Parameters:
  • account_id (str) – ID of Account to get Webhooks for.
  • filters (dict, None) – Kazoo Filter Parameters (see official API docs).
Returns:

Kazoo Data (see official API docs).

Return type:

dict

update_webhook(account_id, webhook_id, data)

Updates a Webhook

Parameters:
  • account_id (str) – ID of Account to update Webhook for.
  • webhook_id (str) – ID of Webhook to update.
  • data (dict) – Kazoo Account data (see official API Docs).
Returns:

Kazoo Data (see official API docs).

Return type:

dict