dc-management-sdk-js
    Preparing search index...

    Class Webhook

    Class representing the Webhook resource. A Webhook is a HTTP callback: a HTTP request that occurs when something happens; a simple event-notification via the HTTP protocol.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _links?: Map<string, HalLink>
    active?: boolean

    Enables or disables the webhook

    customPayload?: WebhookCustomPayload

    A customized payload format.

    events?: string[]

    List of events that will cause this webhook to trigger

    filters?: WebhookFilter[]

    List of filters used to gate sending of webhooks.

    handlers?: string[]

    List of callback URLs to invoke when an event triggers

    headers?: WebhookHeader[]

    List of custom webhook headers to be sent.

    id?: string

    Unique id generated on creation

    label?: string

    Friendly display label for the Webhook

    method?: "DELETE" | "POST" | "PUT" | "PATCH"

    The webhooks HTTP method.

    related: {
        delete: () => Promise<void>;
        hub: () => Promise<Hub>;
        update: (mutation: Webhook) => Promise<Webhook>;
    } = ...

    Resources and actions related to a Webhook

    Type declaration

    • delete: () => Promise<void>

      Delete Webhook

    • hub: () => Promise<Hub>

      Retrieves the Hub this webhook is stored in

    • update: (mutation: Webhook) => Promise<Webhook>

      Updates this Webhook with the changes in the mutation parameter.

    secret?: string

    When a notification is sent, this value will be used to calculate a cryptographic hash which is transmitted as part of the notification. This hash can be used to assert a trusted party sent the notification.

    Methods

    • POST to an action endpoint with no resource response returned.

      Parameters

      • name: string
      • params: any
      • data: any
      • method: POST | PUT | PATCH = HttpMethod.POST

      Returns Promise<void>