Retrieve
client.projects.webhookEndpoints.events.retrieve(stringeventID, EventRetrieveParams { projectId, webhookEndpointId } params, RequestOptionsoptions?): EventRetrieveResponse { webhookEvent }
GET/projects/{projectId}/webhook-endpoints/{webhookEndpointId}/events/{eventId}
Retrieve one delivery event of one of the project’s webhook endpoints
Retrieve
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const event = await client.projects.webhookEndpoints.events.retrieve('eventId', {
projectId: 'projectId',
webhookEndpointId: 'webhookEndpointId',
});
console.log(event.webhookEvent);{
"webhookEvent": {
"id": "id",
"attempts": [
{
"responseStatusCode": 0,
"sentAt": "sentAt"
}
],
"createdAt": "createdAt",
"endpointId": "endpointId",
"payload": {},
"sentAt": "sentAt",
"status": "created",
"type": "*",
"updatedAt": "updatedAt"
}
}Returns Examples
{
"webhookEvent": {
"id": "id",
"attempts": [
{
"responseStatusCode": 0,
"sentAt": "sentAt"
}
],
"createdAt": "createdAt",
"endpointId": "endpointId",
"payload": {},
"sentAt": "sentAt",
"status": "created",
"type": "*",
"updatedAt": "updatedAt"
}
}