Skip to content
Get started

List

teams.webhook_endpoints.list(strteam_id) -> WebhookEndpointListResponse
GET/teams/{teamId}/webhook-endpoints

List the team’s webhook endpoints

ParametersExpand Collapse
team_id: str
ReturnsExpand Collapse
class WebhookEndpointListResponse: …
webhook_endpoints: List[WebhookEndpoint]

A list of the team webhooks

id: str

The ID of the webhook endpoint

created_at: str

The date and time the webhook endpoint was created

enabled: bool

Whether the webhook is enabled

enabled_events: List[Literal["*", "asset.download.completed", "asset.download.created", 16 more]]

The events that trigger the webhook. [’*’] indicates that all events are enabled

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"
nb_failed_calls: float

The number of calls to the webhook endpoint that have failed

nb_total_calls: float

The number of calls to the webhook endpoint

owner_id: str

The ID of the owner of the webhook endpoint: a project id for job lifecycle events, a team id for alert events

owner_type: Literal["project", "team"]

Whether the owner is a project or a team. Required to tell them apart: a project created before the team/project split shares its team’s id

One of the following:
"project"
"team"
updated_at: str

The date and time the webhook endpoint was updated

url: str

The URL of the webhook endpoint

description: Optional[str]

A description of the webhook endpoint

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
)
webhook_endpoints = client.teams.webhook_endpoints.list(
    "teamId",
)
print(webhook_endpoints.webhook_endpoints)
{
  "webhookEndpoints": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "enabled": true,
      "enabledEvents": [
        "*"
      ],
      "nbFailedCalls": 0,
      "nbTotalCalls": 0,
      "ownerId": "ownerId",
      "ownerType": "project",
      "updatedAt": "updatedAt",
      "url": "url",
      "description": "description"
    }
  ]
}
Returns Examples
{
  "webhookEndpoints": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "enabled": true,
      "enabledEvents": [
        "*"
      ],
      "nbFailedCalls": 0,
      "nbTotalCalls": 0,
      "ownerId": "ownerId",
      "ownerType": "project",
      "updatedAt": "updatedAt",
      "url": "url",
      "description": "description"
    }
  ]
}