글로벌 웹후크에 대한 REST API 엔드포인트
REST API를 사용하여 엔터프라이즈의 글로벌 웹후크를 관리합니다.
글로벌 웹후크 정보
이러한 엔드포인트는 인증된 사이트 관리자만 사용할 수 있습니다. 일반 사용자는 404 응답을 받습니다. 전역 웹후크를 구성하는 방법을 알아보려면 전역 웹후크 정보를 참조하세요.
전역 웹후크는 자동적으로 엔터프라이즈에 설치됩니다. 전역 웹후크를 사용하여 엔터프라이즈의 사용자, 조직, 팀 및 리포지토리에 대한 규칙을 자동으로 모니터링하거나 적용하고 대응할 수 있습니다.
전역 웹후크는 조직, 사용자, 리포지토리, 팀, 구성원, 멤버 자격, 포크 및 ping 이벤트 유형을 구독할 수 있습니다.
참고
이러한 엔드포인트는 personal access token (classic)을(를) 사용하는 인증만 지원합니다. 자세한 내용은 개인용 액세스 토큰 관리을(를) 참조하세요.
List global webhooks
fine_grained_access
no_fine_grained_access
"List global webhooks"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
http_status_code
| status_code | 설명 |
|---|---|
200 | OK |
code_samples
request_example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooksResponse
Status: 200[
{
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://HOSTNAME/admin/hooks/1",
"ping_url": "https://HOSTNAME/admin/hooks/1/pings"
}
]Create a global webhook
fine_grained_access
no_fine_grained_access
"Create a global webhook"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 | |||||
|---|---|---|---|---|---|
name string 필수Must be passed as "web". | |||||
config object 필수Key/value pairs to provide settings for this webhook. | |||||
Properties of |
| 이름, 유형, 설명 |
|---|
url string 필수The URL to which the payloads will be delivered. |
content_type string The media type used to serialize the payloads. Supported values include |
secret string If provided, the |
insecure_ssl string Determines whether the SSL certificate of the host for |
events array of strings The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
active boolean Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
기본값: true
http_status_code
| status_code | 설명 |
|---|---|
201 | Created |
code_samples
request_example
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooks \
-d '{"name":"web","events":["organization","user"],"config":{"url":"https://example.com/webhook","content_type":"json","secret":"secret"}}'Response
Status: 201{
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://HOSTNAME/admin/hooks/1",
"ping_url": "https://HOSTNAME/admin/hooks/1/pings"
}Get a global webhook
fine_grained_access
no_fine_grained_access
"Get a global webhook"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
hook_id integer 필수The unique identifier of the hook. You can find this value in the |
http_status_code
| status_code | 설명 |
|---|---|
200 | OK |
code_samples
request_example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooks/HOOK_IDResponse
Status: 200{
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://HOSTNAME/admin/hooks/1",
"ping_url": "https://HOSTNAME/admin/hooks/1/pings"
}Update a global webhook
Parameters that are not provided will be overwritten with the default value or removed if no default exists.
fine_grained_access
no_fine_grained_access
"Update a global webhook"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
hook_id integer 필수The unique identifier of the hook. You can find this value in the |
| 이름, 유형, 설명 | |||||
|---|---|---|---|---|---|
config object Key/value pairs to provide settings for this webhook. | |||||
Properties of |
| 이름, 유형, 설명 |
|---|
url string 필수The URL to which the payloads will be delivered. |
content_type string The media type used to serialize the payloads. Supported values include |
secret string If provided, the |
insecure_ssl string Determines whether the SSL certificate of the host for |
events array of strings The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
active boolean Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
기본값: true
http_status_code
| status_code | 설명 |
|---|---|
200 | OK |
code_samples
request_example
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooks/HOOK_ID \
-d '{"events":["organization"],"config":{"url":"https://example.com/webhook"}}'Response
Status: 200{
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization"
],
"config": {
"url": "https://example.com",
"content_type": "form",
"insecure_ssl": "0"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://HOSTNAME/admin/hooks/1",
"ping_url": "https://HOSTNAME/admin/hooks/1/pings"
}Delete a global webhook
fine_grained_access
no_fine_grained_access
"Delete a global webhook"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
hook_id integer 필수The unique identifier of the hook. You can find this value in the |
http_status_code
| status_code | 설명 |
|---|---|
204 | No Content |
code_samples
request_example
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooks/HOOK_IDResponse
Status: 204Ping a global webhook
This will trigger a ping event to be sent to the webhook.
fine_grained_access
no_fine_grained_access
"Ping a global webhook"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
hook_id integer 필수The unique identifier of the hook. You can find this value in the |
http_status_code
| status_code | 설명 |
|---|---|
204 | No Content |
code_samples
request_example
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/admin/hooks/HOOK_ID/pingsResponse
Status: 204