Event Action
Create Event Subscriptions With Actions
Event Action
Create Event Subscriptions With Actions
Create event triggers to automatically run the extraction and transformation
POST
/
v1
/
events
/
subscriptions
/
actions
/
bulk
curl --request POST \
--url https://api.runtrellis.com/v1/events/subscriptions/actions/bulk \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"events_with_actions": [
{
"event_type": "asset_extracted",
"proj_id": "<string>",
"transform_id": "<string>",
"actions": [
{
"type": "refresh_transform",
"transform_id": "<string>",
"proj_id": "<string>",
"webhook_id": "<string>"
}
]
}
]
}'
{
"message": "<string>",
"data": [
{
"event_subscription_id": "<string>",
"action_ids": [
"<string>"
]
}
]
}
Authorizations
Body
application/json
An enumeration.
Available options:
asset_extracted
, asset_uploaded
, transform_completed
An enumeration.
Available options:
refresh_transform
, run_extraction
, send_webhook
Transformation ID to run the action on. Required for refresh_transform
. Either proj_id
or transform_id
must be present, but not both.
Project ID to run the action on. Required for run_extraction
and send_webhook
. Either proj_id
or transform_id
must be present, but not both.
Webhook ID to call. Only used when send_webhook
is set as type
Project ID for the event subscription. Either proj_id or transform_id must be present, but not both.
Transformation ID for the event subscription. Either proj_id or transform_id must be present, but not both.
curl --request POST \
--url https://api.runtrellis.com/v1/events/subscriptions/actions/bulk \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"events_with_actions": [
{
"event_type": "asset_extracted",
"proj_id": "<string>",
"transform_id": "<string>",
"actions": [
{
"type": "refresh_transform",
"transform_id": "<string>",
"proj_id": "<string>",
"webhook_id": "<string>"
}
]
}
]
}'
{
"message": "<string>",
"data": [
{
"event_subscription_id": "<string>",
"action_ids": [
"<string>"
]
}
]
}