webhooks

Update a specific webhook in a repository.

Update a specific webhook in a repository.

patch/webhooks/{owner}/{repo}/{identifier}/

Request body

eventsstring[] nullable
is_activeboolean

If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.

package_querystring nullable

The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.

request_body_format0 | 1 | 2 | 3

The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template.

request_body_template_format0 | 1 | 2

The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML.

request_content_typestring nullable

The value that will be sent for the 'Content Type' header.

secret_headerstring nullable

The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.

secret_valuestring nullable

The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side.

signature_keystring

The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it).

target_urlstring uri

The destination URL that webhook payloads will be POST'ed to.

verify_sslboolean

If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.

Response

Updated the specified webhook

created_atstring date-time
created_bystring
created_by_urlstring uri
disable_reason0 | 1 | 2 | 3 | 4 | 5 | 6
disable_reason_strstring
eventsstring[] nullable required
identifierinteger nullable

Deprecated (23-05-15): Please use 'slug_perm' instead. Previously: A monotonically increasing number that identified a webhook request within a repository.

is_activeboolean

If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.

is_last_response_badboolean
last_response_statusinteger
last_response_status_strstring
num_sentinteger
package_querystring nullable

The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.

request_body_format0 | 1 | 2 | 3

The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template.

request_body_format_strstring
request_body_template_format0 | 1 | 2

The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML.

request_body_template_format_strstring
request_content_typestring nullable

The value that will be sent for the 'Content Type' header.

secret_headerstring nullable

The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.

self_urlstring uri
slug_permstring slug
target_urlstring uri required

The destination URL that webhook payloads will be POST'ed to.

updated_atstring date-time
updated_bystring
updated_by_urlstring uri
verify_sslboolean

If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.

Changes