Skip to main content

webhook_delivery

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

Overview

Namewebhook_delivery
TypeResource
Idgithub.repos.webhook_delivery

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerUnique identifier of the delivery.
installation_idintegerThe id of the GitHub App installation associated with this event.
repository_idintegerThe 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 delivery was delivered. (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 delivery is a redelivery.
requestobject
responseobject
statusstringDescription of the status of the attempted 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)
urlstringThe URL target of the delivery. (example: https://www.example.com)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_webhook_deliveryselectowner, repo, hook_id, delivery_idReturns a delivery for a webhook configured in a repository.
redeliver_webhook_deliveryexecowner, repo, hook_id, delivery_idRedeliver a webhook delivery 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
delivery_idinteger
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.

SELECT examples

Returns a delivery for a webhook configured in a repository.

SELECT
id,
installation_id,
repository_id,
action,
delivered_at,
duration,
event,
guid,
redelivery,
request,
response,
status,
status_code,
throttled_at,
url
FROM github.repos.webhook_delivery
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND hook_id = '{{ hook_id }}' -- required
AND delivery_id = '{{ delivery_id }}' -- required
;

Lifecycle Methods

Redeliver a webhook delivery for a webhook configured in a repository.

EXEC github.repos.webhook_delivery.redeliver_webhook_delivery 
@owner='{{ owner }}' --required,
@repo='{{ repo }}' --required,
@hook_id='{{ hook_id }}' --required,
@delivery_id='{{ delivery_id }}' --required
;