import { Events, Webhook } from "livepeer/models/components";
let value: Webhook = {
id: "de7818e7-610a-4057-8f6f-b785dc1e6f88",
name: "test_webhook",
projectId: "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
createdAt: 1587667174725,
events: [
Events.StreamStarted,
Events.StreamIdle,
],
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,
},
};
Field | Type | Required | Description | Example |
---|---|---|---|---|
id |
string | ➖ | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 |
name |
string | ✔️ | N/A | test_webhook |
kind |
string | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | webhook |
userId |
string | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
projectId |
string | ➖ | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 |
createdAt |
number | ➖ | Timestamp (in milliseconds) at which stream object was created | 1587667174725 |
events |
components.Events[] | ➖ | N/A | [ "stream.started", "stream.idle" ] |
url |
string | ✔️ | N/A | https://my-service.com/webhook |
streamId |
string | ➖ | streamId of the stream on which the webhook is applied | de7818e7-610a-4057-8f6f-b785dc1e6f88 |
status |
components.Status | ➖ | status of webhook |