circle-info
Squadcast is now SolarWinds Incident Response

Webhooks

Overview

Available Operations

create

Add webhook to the organization. Returns the webhook object in response. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

from squadcast_sdk import SquadcastSDK


with SquadcastSDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as ss_client:

    res = ss_client.webhooks.create(name="<value>", triggers=[], urls=[
        {},
    ], trigger_type="<value>")

    # Handle response
    print(res)

Parameters

Parameter
Type
Required
Description

name

str

✔️

Name of the webhook

triggers

✔️

A list of triggers for this webhook

urls

✔️

A list of URLs to which the webhook payload will be sent

trigger_type

str

✔️

Type of trigger

description

Optional[str]

Description of the webhook

header

Headers to be sent with the webhook

filters

Filters to apply to the webhook

max_retry

Optional[int]

Maximum number of retries for the webhook

teams

List[str]

List of team IDs to which this webhook is applicable

is_all_teams_configured

Optional[bool]

Set to true if the webhook is configured for all teams

custom_payload_template_slug

Optional[str]

Slug of the custom payload template

language

Optional[str]

Language for the webhook payload

mail_ids

List[str]

List of email IDs for notification

custom_payload

Optional[str]

Custom payload for the webhook

payload_type

Optional[str]

Type of payload

retries

Configuration to override the default retry behavior of the client.

Response

models.WebhooksCreateWebhookResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

delete

Remove webhook from the organization. Upon success, the webhook will be removed from the organization. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

event_webhook_id

str

✔️

(Required) event webhook ID

retries

Configuration to override the default retry behavior of the client.

Response

bytesarrow-up-right

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

get_by_id

Returns a webhooks details of the given eventWebhookID in the request param. Requires access_token as a Bearer {{token}} in the Authorization header with read scope.

Example Usage

Parameters

Parameter
Type
Required
Description

event_webhook_id

str

✔️

(Required) event webhook ID

retries

Configuration to override the default retry behavior of the client.

Response

models.WebhooksGetWebhookByIDResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

update

Update organization webhook details. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

event_webhook_id

str

✔️

N/A

name

str

✔️

Name of the webhook

triggers

✔️

A list of triggers for this webhook

urls

✔️

A list of URLs to which the webhook payload will be sent

trigger_type

str

✔️

Type of trigger

description

Optional[str]

Description of the webhook

header

Headers to be sent with the webhook

filters

Filters to apply to the webhook

max_retry

Optional[int]

Maximum number of retries for the webhook

teams

List[str]

List of team IDs to which this webhook is applicable

is_all_teams_configured

Optional[bool]

Set to true if the webhook is configured for all teams

custom_payload_template_slug

Optional[str]

Slug of the custom payload template

language

Optional[str]

Language for the webhook payload

mail_ids

List[str]

List of email IDs for notification

custom_payload

Optional[str]

Custom payload for the webhook

payload_type

Optional[str]

Type of payload

retries

Configuration to override the default retry behavior of the client.

Response

models.WebhooksUpdateWebhookResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

Last updated