This page provides an overview of trigger-related APIs.
Object Overview
Triggers provide a set of match criteria such as an HTTP method and URL to which a data flow is mapped. A trigger indicates what event should cause the execution of the steps within a dataflow and its map.
Endpoint, URL, and Supported Methods
Objects are managed via the View Orchestrator server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/triggers
By default, View Orchestrator server is accessible on port 8501
.
Supported methods include: GET
HEAD
PUT
DELETE
Structure
Objects have the following structure:
{
"GUID": "processor",
"TenantGUID": "default",
"TriggerType": "HTTP",
"Name": "My processing pipeline trigger",
"HttpMethod": "POST",
"HttpUrlPrefix": "/processor",
"CreatedUtc": "2024-07-10T05:10:14.000000Z"
}
Properties:
GUID
string
globally unique identifier for the objectTenantGUID
string
globally unique identifier for the tenantTriggerType
enum
type of trigger, currently onlyHTTP
Name
string
name of the objectHttpMethod
enum
the HTTP method that must match, i.e.GET
PUT
POST
DELETE
HttpUrlPrefix
string
the prefix by which the HTTP URL must matchCreatedUtc
datetime
timestamp from creation, in UTC time
Create
To create, call PUT /v1.0/tenants/[tenant-guid]/triggers
with the following properties using the Orchestrator server: TriggerType
Name
HttpMethod
HttpUrlPrefix
curl -X PUT http://localhost:8601/v1.0/tenants/[tenant-guid]/triggers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [accesskey]" \
-d '
{
"TriggerType": "HTTP",
"Name": "My second trigger",
"HttpMethod": "GET",
"HttpUrlPrefix": "/default2"
}'
Read
To read all objects, call GET /v1.0/tenants/[tenant-guid]/triggers
, which will return an array of objects. To read an individual object by GUID, call GET /v1.0/tenants/[tenant-guid]/triggers/[trigger-guid]
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
{
"GUID": "processor",
"TenantGUID": "default",
"TriggerType": "HTTP",
"Name": "My processing pipeline trigger",
"HttpMethod": "POST",
"HttpUrlPrefix": "/processor",
"CreatedUtc": "2024-07-10T05:10:14.000000Z"
}
Note: the HEAD
method can be used as an alternative to get to simply check the existence of the object. HEAD
requests return either a 200/OK
in the event the object exists, or a 404/Not Found
if not. No response body is returned with a HEAD
request.
Update
To update an object by GUID, call PUT /v1.0/tenants/[tenant-guid]/triggers/[trigger-guid]
with a fully populated object in the request body. The updated object will be returned to you.
Note: certain fields cannot be modified and will be preserved across updates.
Request body:
{
"GUID": "processor",
"TenantGUID": "default",
"TriggerType": "HTTP",
"Name": "My updated processing pipeline trigger",
"HttpMethod": "POST",
"HttpUrlPrefix": "/processor",
"CreatedUtc": "2024-07-10T05:10:14.000000Z"
}
Response body:
{
"GUID": "processor",
"TenantGUID": "default",
"TriggerType": "HTTP",
"Name": "My updated processing pipeline trigger",
"HttpMethod": "POST",
"HttpUrlPrefix": "/processor",
"CreatedUtc": "2024-07-10T05:10:14.000000Z"
}
Delete
To delete an object by GUID, call DELETE /v1.0/tenants/[tenant-guid]/triggers/[trigger-guid]
.