このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-06-03. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの改善、新機能のためには、最新バージョンのGitHub Enterpriseにアップグレードしてく� さい。 アップグレードに関する支援については、GitHub Enterprise supportに連絡してく� さい。
We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the new Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST API pages.
リポジトリwebhookの設定
Get a webhook configuration for a repository
Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use "Get a repository webhook."
Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.
パラメータ
| Headers |
|---|
| 名前, 種類, 説明 |
acceptstringSetting to |
| Path parameters |
| 名前, 種類, 説明 |
ownerstring必� �The account owner of the repository. The name is not case sensitive. |
repostring必� �The name of the repository. The name is not case sensitive. |
hook_idinteger必� �The unique identifier of the hook. |
HTTP response status codes
| Status code | 説明 |
|---|---|
200 | OK |
コードサンプル
curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/hooks/HOOK_ID/configResponse
Status: 200{
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}Update a webhook configuration for a repository
Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use "Update a repository webhook."
Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.
パラメータ
| Headers |
|---|
| 名前, 種類, 説明 |
acceptstringSetting to |
| Path parameters |
| 名前, 種類, 説明 |
ownerstring必� �The account owner of the repository. The name is not case sensitive. |
repostring必� �The name of the repository. The name is not case sensitive. |
hook_idinteger必� �The unique identifier of the hook. |
| Body parameters |
| 名前, 種類, 説明 |
urlstringThe URL to which the payloads will be delivered. |
content_typestringThe media type used to serialize the payloads. Supported values include |
secretstringIf provided, the |
insecure_sslstring or number or Determines whether the SSL certificate of the host for |
HTTP response status codes
| Status code | 説明 |
|---|---|
200 | OK |
コードサンプル
curl \
-X PATCH \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/hooks/HOOK_ID/configResponse
Status: 200{
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}