Sample - GitHub REST API
GET/repos/{owner}/{repo}/hooks/{hook_id}

Get a repository webhook

Returns a webhook configured in a repository. To get only the webhook config properties, see "Get a webhook configuration for a repository."

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
hook_idintegerrequired
The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery.

2 status codes
200Response
typestringrequired
idintegerrequired
Unique identifier of the webhook.
namestringrequired
The name of a valid service, use 'web' for a webhook.
activebooleanrequired
Determines whether the hook is actually triggered on pushes.
eventsarray<string>required
Determines what events the hook is triggered for. Default: ['push'].
configobjectrequired
Configuration object of the webhook
updated_atstringrequired
created_atstringrequired
urlstringrequired
test_urlstringrequired
ping_urlstringrequired
deliveries_urlstringoptional
last_responseobjectrequired
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.