wiki:github_webhooks_via_api_calls
This is an old revision of the document!
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.1617102965.txt.gz · Last modified: 2021/03/30 13:16 by antisa