Skip to main content

webhook_deliveries

Creates, updates, deletes, gets or lists a webhook_deliveries resource.

Overview

Namewebhook_deliveries
TypeResource
Idgithub.repos.webhook_deliveries

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger (int64)Unique identifier of the webhook delivery.
installation_idinteger (int64)The id of the GitHub App installation associated with this event.
repository_idinteger (int64)The id of the repository associated with this event.
actionstringThe type of activity for the event that triggered the delivery. (example: opened)
delivered_atstring (date-time)Time when the webhook delivery occurred. (example: 2021-05-12T20:33:44Z)
durationnumberTime spent delivering.
eventstringThe event that triggered the delivery. (example: issues)
guidstringUnique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). (example: 58474f00-b361-11eb-836d-0e4f3503ccbe)
redeliverybooleanWhether the webhook delivery is a redelivery.
statusstringDescribes the response returned after attempting the delivery. (example: failed to connect)
status_codeintegerStatus code received when delivery was made.
throttled_atstring (date-time)Time when the webhook delivery was throttled. (example: 2021-05-12T20:33:44Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_webhook_deliveriesselectowner, repo, hook_idper_page, cursor, statusReturns a list of webhook deliveries for a webhook configured in a repository.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hook_idintegerThe unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
cursorstringUsed for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
statusstringReturns webhook deliveries filtered by delivery outcome classification based on status_code range. A status of success returns deliveries with a status_code in the 200-399 range (inclusive). A status of failure returns deliveries with a status_code in the 400-599 range (inclusive).

SELECT examples

Returns a list of webhook deliveries for a webhook configured in a repository.

SELECT
id,
installation_id,
repository_id,
action,
delivered_at,
duration,
event,
guid,
redelivery,
status,
status_code,
throttled_at
FROM github.repos.webhook_deliveries
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND hook_id = '{{ hook_id }}' -- required
AND per_page = '{{ per_page }}'
AND cursor = '{{ cursor }}'
AND status = '{{ status }}'
;