wiki:github_webhooks_via_api_calls
Table of Contents
Github webhooks via api calls
Get all webhooks
curl -H "Authorization: token TOKEN" --request GET https://api.github.com/repos/USERNAME/scripts_and_progs/hooks
Get specific webhook
curl -H "Authorization: token TOKEN" --request GET https://api.github.com/repos/USERNAME/scripts_and_progs/hooks/158835392
Create new webhook
curl -H "Authorization: token TOKEN" -H "Content-Type: application/json" --request POST \ --data '{"name": "web", "active": true, "events": ["pull_request"], "config": {"url": "https://bamboo.example.com/rest/triggers/latest/remote/changeDetection?planKey=TEST-TEST1", "content_type": "json", "insecure_ssl": "0"} }' \ https://api.github.com/repos/USERNAME/scripts_and_progs/hooks
Delete webhook
curl -H "Authorization: token TOKEN" --request DELETE https://api.github.com/repos/USERNAME/scripts_and_progs/hooks/158835392
Tested on
See also
References
wiki/github_webhooks_via_api_calls.txt · Last modified: 2024/05/15 15:33 by antisa