Subscriptions

Create a Subscription

Creates a new subscription to listen to transform or error events.

POST
/v1-alpha/subscriptions
x-api-key<token>

Authenticate using API Key in request header

In: header

Request Body

application/json

name*string

Name of subscription.

type*string

Type of subscription.

Value in"transform" | "analyze" | "route" | "join" | "split_collection" | "split_item" | "evaluation" | "error" | "collection_processing"
functionName?string

Unique name of function this subscription listens to (required for function-based subscriptions).

functionID?string

Unique identifier of function this subscription listens to (alternative to functionName).

collectionName?string

Name of collection this subscription listens to (required for collection-based subscriptions).

collectionID?string

Unique identifier of collection this subscription listens to (alternative to collectionName).

disabled?boolean

Toggles whether subscription is active or not.

webhookURL?string

URL bem will send webhook requests to.

Response Body

application/json

curl -X POST "https://api.bem.ai/v1-alpha/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "transform"  }'
{
  "name": "string",
  "subscriptionID": "string",
  "type": "transform",
  "functionID": "string",
  "functionName": "string",
  "collectionID": "string",
  "collectionName": "string",
  "disabled": true,
  "webhookURL": "https://bem-example.ai/test/url"
}