hooks

Retrieve a project webhook

Retrieves a specified webhook for a project.

get/api/v4/projects/{id}/hooks/{hook_id}

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the project

hook_idinteger required

The ID of a project hook

Response

Retrieve a project webhook

idinteger required
urlstring required
namestring required
descriptionstring required
created_atstring date-time required
push_eventsboolean required
tag_push_eventsboolean required
merge_requests_eventsboolean required
repository_update_eventsboolean required
enable_ssl_verificationboolean required
organization_idinteger
alert_statusstring required
disabled_untilstring date-time required
url_variablesobject[]
push_events_branch_filterstring required
branch_filter_strategystring required
custom_webhook_templatestring required
custom_headersobject[]
token_presentboolean required

Whether a secret token is configured

signing_token_presentboolean required

Whether an HMAC signing token is configured

project_idinteger required
issues_eventsboolean required
confidential_issues_eventsboolean required
note_eventsboolean required
confidential_note_eventsboolean required
pipeline_eventsboolean required
wiki_page_eventsboolean required
deployment_eventsboolean required
feature_flag_eventsboolean required
job_eventsboolean required
releases_eventsboolean required
milestone_eventsboolean required
emoji_eventsboolean required
resource_access_token_eventsboolean required
resource_deploy_token_eventsboolean required
vulnerability_eventsboolean required

Example response

{
  "id": 1,
  "url": "https://webhook.site",
  "name": "Hook name",
  "description": "Hook description",
  "created_at": "2012-05-28T04:42:42-07:00",
  "organization_id": 1,
  "alert_status": "executable",
  "disabled_until": "2012-05-28T04:42:42-07:00",
  "url_variables": [
    {
      "token": "secr3t"
    }
  ],
  "push_events_branch_filter": "my-branch-*",
  "branch_filter_strategy": "wildcard",
  "custom_webhook_template": "{\"event\":\"{{object_kind}}\"}",
  "custom_headers": [
    {
      "X-Custom-Header": "value"
    }
  ],
  "project_id": 1
}

Changes

No recorded changes to this operation across all 5 revisions of this API.