Create a webhook - OsiriX-Foundation/KheopsAuthorization GitHub Wiki
Used to create a new webhook to an album. The user must be an admin.
URL : /albums/{album_id}/webhooks
Method : POST
Auth Required : Authorization with a JWT Bearer token with the user as the sub claim.
Headers
Accept
: If present, require that this value beapplication/json
Content-Type
: Must be :application/x-www-form-urlencoded
Parameters
url={url}
max 1024 characters the scheme can only behttp
orhttps
name={description}
min 1, max 255 characterssecret={secret}
(Optional) min 1, max 1024 charactersevent={event}
- event : new_series, new_user, remove_series, delete_album.
event
can be send multiple times.
- event : new_series, new_user, remove_series, delete_album.
enabled={true/false}
by default : true (Optional)
Success Response
- Status :
201 Created
{
"id": "QAdfIstxuOvwkcm39WEO",
"url": "https://webhook.site/123456",
"name": "the name of the webhook",
"use_secret": false,
"events": ["new_series","new_user"],
"enabled": true,
"last_triggers": [],
"number_of_triggers": 0
}
Error Response
If the user is not found If the album is not found
- Status :
404 Not Found
If a parameter is wrong
- Status :
400 Bad Request