- **status**: in-progress --> review
- **Comment**:
Closed #731. `ib/7832`
**Endpoints description (need to add this to API docs wiki page):**
- list webhooks:
- `GET /rest/p/<project>/admin/<app>/webhooks`
- e.g. `/rest/p/test/admin/git/webhooks`
- view webhook:
- `GET /rest/p/<project>/admin/<app>/webhooks/<type>/<id>`
- e.g. `/rest/p/test/admin/git/webhooks/repo-push/54db231c04687d300e65db82`
- create a webhook:
- `POST /rest/p/<project>/admin/<app>/webhooks/<type>/`
- e.g. `/rest/p/test/admin/git/webhooks/repo-push`
- params: `url`
- edit a webhok:
- `POST /rest/p/<project>/admin/<app>/webhooks/<type>/<id>`
- e.g. `/rest/p/test/admin/git/webhooks/repo-push/54db231c04687d300e65db82`
- params: `url`, `secret` (each can be omitted if don't want to update)
- delete a webhook:
- `DELETE /rest/p/<project>/admin/<app>/webhooks/<type>/<id>`
- e.g. `/rest/p/test/admin/git/webhooks/repo-push/54db231c04687d300e65db82`
**Authentication:**
See [API auth
docs](https://sourceforge.net/p/forge/documentation/Allura%20API/#authenticating-requests).
Works with both bearer tokens and application flow. However, for HTTP methods
such as `DELETE` you'll need to authorize with headers, rather than through
request body parameters. I've added support of this to Allura (see `55c0748`).
We should add this to [API auth
docs](https://sourceforge.net/p/forge/documentation/Allura%20API/#authenticating-requests)
when it lands.
- if you're using application flow you good to go (python oauth lib uses
headers already)
- if you're using bearer tokens, pass it as header: `headers={'Authorization':
'OAuth BearerToken access_token=<your_token>'}`
Also, for sourceforge deployment apache is not configured to pass auth headers
to wsgi app (at least on sandboxes), so you'll need to add
`WSGIPassAuthorization On` to `allura-venv.conf`. Probably we need to update
some docs for installing Allura somewhere?
**QA**
Apply [this change](https://github.com/simplegeo/python-oauth2/pull/97/files)
to python-oauth2 to avoid certificat errors on sandbox.
---
** [tickets:#7832] APIs to manage webhooks**
**Status:** review
**Milestone:** unreleased
**Labels:** sf-4 api 42cc sf-current
**Created:** Mon Feb 09, 2015 04:26 PM UTC by Dave Brondsema
**Last Updated:** Mon Feb 23, 2015 01:02 PM UTC
**Owner:** Igor Bondarenko
We should support APIs to manage webhooks so that 3rd-party sites can use oauth
to configure a webhook on behalf of a user. This is a common practice to make
it easier for the user.
---
Sent from forge-allura.apache.org because [email protected] is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.