Skip to content
Get started

List

client.projects.webhookEndpoints.events.list(stringwebhookEndpointID, EventListParams { projectId, paginationToken } params, RequestOptionsoptions?): EventListResponse { items, nextPaginationToken }
GET/projects/{projectId}/webhook-endpoints/{webhookEndpointId}/events

List the project’s webhook events

ParametersExpand Collapse
webhookEndpointID: string
params: EventListParams { projectId, paginationToken }
projectId: string

Path param: The project Id

paginationToken?: string

Query param: A token you received in a previous request to query the next page of items

ReturnsExpand Collapse
EventListResponse { items, nextPaginationToken }
items: Array<Item>

A list of the project webhook events

id: string
endpointId: string
status: "created" | "failed" | "retrying" | "success"
One of the following:
"created"
"failed"
"retrying"
"success"
type: "*" | "asset.download.completed" | "asset.download.created" | 16 more

Every event a webhook endpoint can subscribe to: a project endpoint takes the job lifecycle events, a team endpoint takes the alert events.

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
updatedAt: string
nextPaginationToken?: string

A token to query the next page of events

List

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 events = await client.projects.webhookEndpoints.events.list('webhookEndpointId', {
  projectId: 'projectId',
});

console.log(events.items);
{
  "items": [
    {
      "id": "id",
      "endpointId": "endpointId",
      "status": "created",
      "type": "*",
      "updatedAt": "updatedAt"
    }
  ],
  "nextPaginationToken": "nextPaginationToken"
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "endpointId": "endpointId",
      "status": "created",
      "type": "*",
      "updatedAt": "updatedAt"
    }
  ],
  "nextPaginationToken": "nextPaginationToken"
}