webhook_deliveries
Creates, updates, deletes, gets or lists a webhook_deliveries resource.
Overview
| Name | webhook_deliveries |
| Type | Resource |
| Id | github.orgs.webhook_deliveries |
Fields
The following fields are returned by SELECT queries:
- list_webhook_deliveries
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | Unique identifier of the webhook delivery. |
installation_id | integer (int64) | The id of the GitHub App installation associated with this event. |
repository_id | integer (int64) | The id of the repository associated with this event. |
action | string | The type of activity for the event that triggered the delivery. (example: opened) |
delivered_at | string (date-time) | Time when the webhook delivery occurred. (example: 2021-05-12T20:33:44Z) |
duration | number | Time spent delivering. |
event | string | The event that triggered the delivery. (example: issues) |
guid | string | Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). (example: 58474f00-b361-11eb-836d-0e4f3503ccbe) |
redelivery | boolean | Whether the webhook delivery is a redelivery. |
status | string | Describes the response returned after attempting the delivery. (example: failed to connect) |
status_code | integer | Status code received when delivery was made. |
throttled_at | string (date-time) | Time when the webhook delivery was throttled. (example: 2021-05-12T20:33:44Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_webhook_deliveries | select | org, hook_id | per_page, cursor, status | Returns a list of webhook deliveries 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 editwebhooks 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.
| Name | Datatype | Description |
|---|---|---|
hook_id | integer | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
org | string | The organization name. The name is not case sensitive. |
cursor | string | Used 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_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
status | string | Returns 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
- list_webhook_deliveries
Returns a list of webhook deliveries 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,
status,
status_code,
throttled_at
FROM github.orgs.webhook_deliveries
WHERE org = '{{ org }}' -- required
AND hook_id = '{{ hook_id }}' -- required
AND per_page = '{{ per_page }}'
AND cursor = '{{ cursor }}'
AND status = '{{ status }}'
;