Skip to content
Get started

List

projects.webhook_endpoints.events.list(strwebhook_endpoint_id, EventListParams**kwargs) -> EventListResponse
GET/projects/{projectId}/webhook-endpoints/{webhookEndpointId}/events

List the project’s webhook events

ParametersExpand Collapse
project_id: str
webhook_endpoint_id: str
pagination_token: Optional[str]

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

ReturnsExpand Collapse
class EventListResponse: …
items: List[Item]

A list of the project webhook events

id: str
endpoint_id: str
status: Literal["created", "failed", "retrying", "success"]
One of the following:
"created"
"failed"
"retrying"
"success"
type: Literal["*", "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"
updated_at: str
next_pagination_token: Optional[str]

A token to query the next page of events

List

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
events = client.projects.webhook_endpoints.events.list(
    webhook_endpoint_id="webhookEndpointId",
    project_id="projectId",
)
print(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"
}