curl --request POST \
--url http://localhost:3000/api/v1/triggers/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"account": "<string>",
"agent": "<string>",
"cooldown": "<string>",
"debounce": "<string>",
"envFile": "<string>",
"exec": "<string>",
"filter": "<string>",
"message": "<string>",
"onError": "<string>",
"replySession": "<string>",
"session": "<string>",
"shell": "<string>",
"timeout": "<string>",
"topic": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/triggers/add"
payload = {
"name": "<string>",
"account": "<string>",
"agent": "<string>",
"cooldown": "<string>",
"debounce": "<string>",
"envFile": "<string>",
"exec": "<string>",
"filter": "<string>",
"message": "<string>",
"onError": "<string>",
"replySession": "<string>",
"session": "<string>",
"shell": "<string>",
"timeout": "<string>",
"topic": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
account: '<string>',
agent: '<string>',
cooldown: '<string>',
debounce: '<string>',
envFile: '<string>',
exec: '<string>',
filter: '<string>',
message: '<string>',
onError: '<string>',
replySession: '<string>',
session: '<string>',
shell: '<string>',
timeout: '<string>',
topic: '<string>'
})
};
fetch('http://localhost:3000/api/v1/triggers/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/triggers/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'account' => '<string>',
'agent' => '<string>',
'cooldown' => '<string>',
'debounce' => '<string>',
'envFile' => '<string>',
'exec' => '<string>',
'filter' => '<string>',
'message' => '<string>',
'onError' => '<string>',
'replySession' => '<string>',
'session' => '<string>',
'shell' => '<string>',
'timeout' => '<string>',
'topic' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/triggers/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/triggers/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/triggers/add")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"changedCount": 123,
"status": "<string>",
"target": {
"type": "<string>"
},
"trigger": {}
}Add a new event trigger
curl --request POST \
--url http://localhost:3000/api/v1/triggers/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"account": "<string>",
"agent": "<string>",
"cooldown": "<string>",
"debounce": "<string>",
"envFile": "<string>",
"exec": "<string>",
"filter": "<string>",
"message": "<string>",
"onError": "<string>",
"replySession": "<string>",
"session": "<string>",
"shell": "<string>",
"timeout": "<string>",
"topic": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/triggers/add"
payload = {
"name": "<string>",
"account": "<string>",
"agent": "<string>",
"cooldown": "<string>",
"debounce": "<string>",
"envFile": "<string>",
"exec": "<string>",
"filter": "<string>",
"message": "<string>",
"onError": "<string>",
"replySession": "<string>",
"session": "<string>",
"shell": "<string>",
"timeout": "<string>",
"topic": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
account: '<string>',
agent: '<string>',
cooldown: '<string>',
debounce: '<string>',
envFile: '<string>',
exec: '<string>',
filter: '<string>',
message: '<string>',
onError: '<string>',
replySession: '<string>',
session: '<string>',
shell: '<string>',
timeout: '<string>',
topic: '<string>'
})
};
fetch('http://localhost:3000/api/v1/triggers/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/triggers/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'account' => '<string>',
'agent' => '<string>',
'cooldown' => '<string>',
'debounce' => '<string>',
'envFile' => '<string>',
'exec' => '<string>',
'filter' => '<string>',
'message' => '<string>',
'onError' => '<string>',
'replySession' => '<string>',
'session' => '<string>',
'shell' => '<string>',
'timeout' => '<string>',
'topic' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/triggers/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/triggers/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/triggers/add")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"account\": \"<string>\",\n \"agent\": \"<string>\",\n \"cooldown\": \"<string>\",\n \"debounce\": \"<string>\",\n \"envFile\": \"<string>\",\n \"exec\": \"<string>\",\n \"filter\": \"<string>\",\n \"message\": \"<string>\",\n \"onError\": \"<string>\",\n \"replySession\": \"<string>\",\n \"session\": \"<string>\",\n \"shell\": \"<string>\",\n \"timeout\": \"<string>\",\n \"topic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"changedCount": 123,
"status": "<string>",
"target": {
"type": "<string>"
},
"trigger": {}
}Authorizations
Runtime context-key (rctx_*) issued by the Ravi gateway. Used by ordinary gateway operations; not accepted by Console-only operations. Bootstrap the first key with ravi daemon init-admin-key; rotate, derive, and revoke via the ravi context family. Specs: runtime/context-keys, sdk/auth.
Body
Trigger name
Account for channel delivery (auto-detected from agent)
Agent ID (default: default agent)
Minimum gap between fires; events inside it are dropped (e.g., 30s, 1m; off to disable). Default: 5s
Batch a burst of events into one fire, this long after the last event, carrying every event (e.g., 2s, 1m). Default: off
Env file loaded for shell triggers
Alias for --shell
Filter expression (e.g. 'data.cwd == "/path/to/workspace"')
Prompt message (defaults to catalog template when available)
Error action, e.g. notify-session:
Override the session used for outbound delivery (defaults to caller session)
Session to run in, by name; may be a template resolved per event (e.g. issue-{{data.payload.row.values.topic_id.0}}) for one session per value; an event whose name does not resolve is skipped, never sent to another session. Created when missing. Default: the current session, or the agent main session outside one. The reserved values main and isolated keep their old meaning (the agent main session; one session per trigger)
Run a shell command directly without invoking an agent
Shell timeout, e.g. 60 or 5m
Notif topic pattern to subscribe to