Skip to main content

webhook_delivery

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

Overview

Namewebhook_delivery
TypeResource
Idgithub.orgs.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_deliveryselectorg, hook_id, delivery_idReturns a delivery for a webhook configured in an organization.

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or edit
webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.
redeliver_webhook_deliveryexecorg, hook_id, delivery_idRedeliver a delivery for a webhook configured in an organization.

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or edit
webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

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.
orgstringThe organization name. The name is not case sensitive.

SELECT examples

Returns a delivery for a webhook configured in an organization.

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or edit
webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

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

Lifecycle Methods

Redeliver a delivery for a webhook configured in an organization.

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or edit
webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

EXEC github.orgs.webhook_delivery.redeliver_webhook_delivery 
@org='{{ org }}' --required,
@hook_id='{{ hook_id }}' --required,
@delivery_id='{{ delivery_id }}' --required
;