Skip to content
Get started

Update

PUT/teams/{teamId}/webhook-endpoints/{webhookEndpointId}

Update a particular webhook endpoint for a team

Path ParametersExpand Collapse
teamId: string
webhookEndpointId: string
Body ParametersJSONExpand Collapse
description: optional string

A description of the webhook endpoint

enabled: optional boolean

Whether the webhook is enabled

enabledEvents: optional array of "*" or "asset.download.completed" or "asset.download.created" or 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"
url: optional string

The URL of the webhook endpoint. Must be an absolute http(s) URL

ReturnsExpand Collapse
webhookEndpoint: object { id, createdAt, enabled, 8 more }
id: string

The ID of the webhook endpoint

createdAt: string

The date and time the webhook endpoint was created

enabled: boolean

Whether the webhook is enabled

enabledEvents: array of "*" or "asset.download.completed" or "asset.download.created" or 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"
nbFailedCalls: number

The number of calls to the webhook endpoint that have failed

nbTotalCalls: number

The number of calls to the webhook endpoint

ownerId: string

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

ownerType: "project" or "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"
updatedAt: string

The date and time the webhook endpoint was updated

url: string

The URL of the webhook endpoint

description: optional string

A description of the webhook endpoint

Update

curl https://api.cloud.scenario.com/v1/teams/$TEAM_ID/webhook-endpoints/$WEBHOOK_ENDPOINT_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{}'
{
  "webhookEndpoint": {
    "id": "id",
    "createdAt": "createdAt",
    "enabled": true,
    "enabledEvents": [
      "*"
    ],
    "nbFailedCalls": 0,
    "nbTotalCalls": 0,
    "ownerId": "ownerId",
    "ownerType": "project",
    "updatedAt": "updatedAt",
    "url": "url",
    "description": "description"
  }
}
Returns Examples
{
  "webhookEndpoint": {
    "id": "id",
    "createdAt": "createdAt",
    "enabled": true,
    "enabledEvents": [
      "*"
    ],
    "nbFailedCalls": 0,
    "nbTotalCalls": 0,
    "ownerId": "ownerId",
    "ownerType": "project",
    "updatedAt": "updatedAt",
    "url": "url",
    "description": "description"
  }
}