このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-06-03. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの改善、新機能のためには、最新バージョンのGitHub Enterpriseにアップグレードしてく� さい。 アップグレードに関する支援については、GitHub Enterprise supportに連絡してく� さい。
GitHub App webhook
GitHub App webhook APIについて
GitHub Appのwebhookを使うと、特定のイベントがアプリケーションで生じた際に、HTTPのPOSTペイロードを受信できます。 The webhook REST APIs enable you to manage repository, organization, and app webhooks. You can also use the REST API to change the configuration of the webhook. たとえば、ペイロードURL、コンテントタイプ、SSLの検証、シークレットを変更できます。 詳しい情� �については、以下を参照してく� さい。
Get a webhook configuration for an app
Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "Creating a GitHub App."
You must use a JWT to access this endpoint.
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/app/hook/configResponse
Status: 200{
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}Update a webhook configuration for an app
Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "Creating a GitHub App."
You must use a JWT to access this endpoint.
パラメータ
| Headers |
|---|
| 名前, 種類, 説明 |
acceptstringSetting to |
| 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/app/hook/config \
-d '{"content_type":"json","insecure_ssl":"0","secret":"********","url":"https://example.com/webhook"}'Response
Status: 200{
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}