Skip to main content
POST
Create a new workspace trigger using XanoScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
integer<int64>
required

Query Parameters

branch
string
default:""
include_xanoscript
boolean
default:false

Body

text/x-xanoscript

The body is of type string.

Example:

"workspace_trigger foo {\n input {\n object to_branch? {\n schema {\n int id?\n text label? filters=trim\n }\n }\n object from_branch? {\n schema {\n int id?\n text label? filters=trim\n }\n }\n enum action {\n values = [\"branch_live\", \"branch_merge\", \"branch_new\"]\n }\n }\n stack {\n var $x1 {\n value = $input.score + 1\n }\n }\n actions = {branch_live: true, branch_merge: true, branch_new: true}\n}\n"

Response

Success!

id
integer<int64>
default:1
created_at
string<timestamptz>
default:2023-04-19 21:01:32+0000
updated_at
string<timestamptz>
default:2023-04-19 21:01:32+0000
name
string
default:Workflow Trigger
description
string
default:My workflow trigger test description
guid
string
default:YE1fwVhQ-enRlc6Sb42Gqru58-0
branch
string
default:v1
tag
string[]
actions
object
xanoscript
object