Web Hooks
#
Programmatic listening to video status change eventsDate: 2018-09-30
Three actions are supported using web hooks:
- List all hooks
- Create new hook
- Delete a hook
Read on authorization for more details on the authorization header in the above request
- Supported events:
video:ready
andvideo:readyall
- Supported types:
http
Webhook HTTP request information:
- Method: POST
- Content-type: application/json
- Sample body:
{ hookId: '5d56a5234f99432b9379f3230efb62cc', event: 'video:ready', time: 1538330269833, payload: { id: '8cf4129200a44a1f93b93229ac7090bf', title: 'The Daily Dweebs.mp4', upload_time: 1538329973, tags: null, length: 60, status: 'ready' }}
#
Sample CURL statements- List all hooks
curl -i https://dev.vdocipher.com/api/hooks/ -H 'authorization: Apisecret __________' -H 'content-type: application/json'
- Create new hook
curl -i -X POST https://dev.vdocipher.com/api/hooks/ -H 'authorization: Apisecret __________' -H 'content-type: application/json' -d '{"type": "http", "value": "http://example.com/path/","event": "video:ready", "status": 1}'
- Delete a hook
curl -i -X DELETE https://dev.vdocipher.com/api/hooks/ -H 'authorization: Apisecret __________' -H 'content-type: application/json' -d '{"uuid": "_______"}'