Webhook
Retrieve all webhooks
Overview
APIs
- Asset
- Livestream
- Generate
- Multistream target
- Session
- Access control
- Webhook
- Task
- Playback
- Transcode
- Viewership
Webhook
Retrieve all webhooks
GET
/
webhook
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.webhook.getAll();
// Handle the result
console.log(result);
}
run();
[
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_webhook",
"kind": "webhook",
"userId": "<string>",
"projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
"createdAt": 1587667174725,
"events": [
"stream.started",
"stream.idle"
],
"url": "https://my-service.com/webhook",
"streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"status": {
"lastFailure": {
"timestamp": 1587667174725,
"error": "Error message",
"response": "Response body",
"statusCode": 500
},
"lastTriggeredAt": 1587667174725
}
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200
application/json
Success
The response is of type object[]
.
Was this page helpful?
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.webhook.getAll();
// Handle the result
console.log(result);
}
run();
[
{
"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"name": "test_webhook",
"kind": "webhook",
"userId": "<string>",
"projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
"createdAt": 1587667174725,
"events": [
"stream.started",
"stream.idle"
],
"url": "https://my-service.com/webhook",
"streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
"status": {
"lastFailure": {
"timestamp": 1587667174725,
"error": "Error message",
"response": "Response body",
"statusCode": 500
},
"lastTriggeredAt": 1587667174725
}
}
]