Triggers
List all triggers
GET /api/workspaces/{workspaceId}/triggers
List all created triggers in the workspace
Path parameters
-
workspaceId
string base64uuid RequiredThe workspace ID
Returns
200
OK
curl -X get \ https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/triggers \ -H 'Authorization: Bearer <YOUR_API_TOKEN>'
{ "type": "array", "items": { "type": "object", "required": [ "id", "title", "templateId", "createdAt", "updatedAt" ], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "templateId": { "type": "string" }, "secretKey": { "type": "string", "description": "This key must be passed in the URL to invoke the trigger" }, "defaultArguments": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }}
Create a new trigger for a template
POST /api/workspaces/{workspaceId}/triggers
Creates a new trigger for a template
Path parameters
-
workspaceId
string base64uuid RequiredThe workspace ID
Body parameters
Template URL or body
-
title
string Required -
templateName
string name Required -
defaultArguments
object
Returns
200
OK
curl -X post \ https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/triggers \ -H 'Authorization: Bearer <YOUR_API_TOKEN>'
{ "type": "object", "required": [ "id", "title", "templateId", "createdAt", "updatedAt" ], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "templateId": { "type": "string" }, "secretKey": { "type": "string", "description": "This key must be passed in the URL to invoke the trigger" }, "defaultArguments": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }}
Retrieve a trigger
GET /api/triggers/{triggerId}
Retrieves a trigger from a workspace by its ID
Path parameters
-
triggerId
string base64uuid RequiredID of the trigger
Returns
200
OK
curl -X get \ https://studio.fiberplane.com/api/triggers/%7BtriggerId%7D \ -H 'Authorization: Bearer <YOUR_API_TOKEN>'
{ "type": "object", "required": [ "id", "title", "templateId", "createdAt", "updatedAt" ], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "templateId": { "type": "string" }, "secretKey": { "type": "string", "description": "This key must be passed in the URL to invoke the trigger" }, "defaultArguments": { "type": "object" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }}
Delete a trigger
DELETE /api/triggers/{triggerId}
Deletes a trigger from a workspace by its ID
Path parameters
-
triggerId
string base64uuid RequiredID of the trigger
Returns
200
OK
curl -X delete \ https://studio.fiberplane.com/api/triggers/%7BtriggerId%7D \ -H 'Authorization: Bearer <YOUR_API_TOKEN>'
Invoke a trigger
POST /api/triggers/{triggerId}/{secretKey}
Invoke a trigger to create a notebook from the associated template
Path parameters
-
triggerId
string base64uuid RequiredID of the trigger
-
secretKey
string RequiredSecret key of the trigger (included in the response when the trigger is first created)
Returns
200
OK
curl -X post \ https://studio.fiberplane.com/api/triggers/%7BtriggerId%7D/%7BsecretKey%7D
{ "type": "object", "required": [ "notebookTitle", "notebookId", "notebookUrl" ], "properties": { "notebookTitle": { "type": "string" }, "notebookId": { "type": "string", "format": "base64uuid" }, "notebookUrl": { "type": "string", "format": "uri" } }}