We are building an integration that uses the Jira Cloud REST API v2, but we are encountering difficulties with handling dynamic webhooks. We are using these endpoints:
GET /rest/api/2/webhook
POST /rest/api/2/webhook
DELETE /rest/api/2/webhook
The problem is that these endpoints are inconsistent in how they treat webhooks. The GET endpoint only returns webhooks the requesting user has set up, treating them as user-specific. The POST endpoint, however, requires the callback url to match across webhooks for all users, treating them as app specific. This means that if user-A creates wants to create a webhook with their own url, but user-B has already created a webhook with a different url, there is nothing user-A can do. They are essentially locked out of the api.
Can you please make this experience more consistent? Perhaps by adding a new endpoint that returns all webhooks registered by all users? As it is, the api is introducing opportunities for major bugs, which could make our integration unusable, with no workaround.
I wonder if this is actually a bug. The documentation says that the GET /rest/api/2/webhook
endpoint “returns a paginated list of the webhooks registered by the calling app.” However, it does not do that. It returns a list of webhooks registered by the calling user, not app.