Skip to main content
POST
Create a new realtime 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:

"realtime_trigger foo {\n channel = \"my_channel\"\n input {\n enum action {\n values = [\"message\", \"join\"]\n }\n text channel\n object client {\n schema {\n json extras\n object permissions {\n schema {\n int dbo_id\n text row_id\n }\n }\n }\n }\n object options {\n schema {\n bool authenticated\n text channel\n }\n }\n json payload\n }\n stack {\n var $x1 {\n value = 123\n }\n }\n actions = {connection: 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:Realtime Trigger
description
string
default:My realtime trigger test description
guid
string
default:YE1fwVhQ-enRlc6Sb42Gqru58-0
branch
string
default:v1
tag
string[]
actions
object
xanoscript
object