Enable and configure webhooks using API
complete
Oran Wilder
complete
Webhooks can now be configured via API. Learn more in the API docs: https://circleci.com/docs/api/v2/#tag/Webhook
If you're also interested in org-wide webhooks, make sure you follow
https://circleci.canny.io/webhooks/p/organization-wide-webhooks
Oran Wilder
in progress
Luiz Antonio Muller
We have the same problem
In our case, we have more than 200 projects in the circleCI, and we use some automation to create a new one... but for now, the webhook configuration needs to be done manually. It's really toilsome
Oran Wilder
Merged in a post:
Webhook Management API
D
Daniel Lamando
Webhooks are currently a per-project configuration. When setting up a webhook for dozens of projects, an API to create/update/remove webhooks would make the task much less repetitive. It would also allow for automation of adding new projects as their repositories are scaffolded.
Oran Wilder
Merged in a post:
Allow Webhooks to be added/removed via CircleCI API
Andrea Censi
Currently (Jan 2022), the only way to add/remove a webhook to a project is to do it manually via the project settings page.
What would be very useful is the possibility of using the CircleCI API for this task.
The API would be rather simple, because essentially we are adding or removing items from a dictionary.
This would benefit both users and CircleCI - because the current situation discourages users to use webhooks in favor of polling, which is inconvenient for everybody.
Some details of my use case follow.
―
In my case, I work in an organization with ~50 repositories. We have several "dashboards" that we built on top of the CircleCI API. These dashboards poll regularly the projects to get the latest news.
The reason we don't use webhooks is not just the fact that it is a hassle to set them up manually, but also the (more important) reason that we do not have a way to verify that the webhooks are deployed, because not even this fact is exposed by the API.
When we create a new repository, at least we can check via the API if the project is set up. (if not, the user is directed to set it up.)
But we are not be able to check whether a webhook is installed (without hacking a scenario which involves generating jobs and polling).