Trigger Automation
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger \
--header 'Content-Type: application/json' \
--data '
{
"now": "2023-12-25",
"force": true,
"dry_run": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25"
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger"
payload = {
"now": "2023-12-25",
"force": True,
"dry_run": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
now: '2023-12-25',
force: true,
dry_run: true,
start_date: '2023-12-25',
end_date: '2023-12-25'
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger",
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([
'now' => '2023-12-25',
'force' => true,
'dry_run' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"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 := "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger"
payload := strings.NewReader("{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger")
.header("Content-Type", "application/json")
.body("{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Automation
Trigger Automation
A POST to the /automations/{automation}/trigger endpoint allows your application to trigger an automation.
Pass now (or omit it to use today) to evaluate the automation as of a specific date. Set dry_run to true
to simulate the automation without creating any production records or firing events; a dry run may also accept
a start_date and end_date to simulate every day across a range.
POST
/
v3
/
automations
/
{automation}
/
trigger
Trigger Automation
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger \
--header 'Content-Type: application/json' \
--data '
{
"now": "2023-12-25",
"force": true,
"dry_run": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25"
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger"
payload = {
"now": "2023-12-25",
"force": True,
"dry_run": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
now: '2023-12-25',
force: true,
dry_run: true,
start_date: '2023-12-25',
end_date: '2023-12-25'
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger",
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([
'now' => '2023-12-25',
'force' => true,
'dry_run' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"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 := "https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger"
payload := strings.NewReader("{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger")
.header("Content-Type", "application/json")
.body("{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/automations/{automation}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"now\": \"2023-12-25\",\n \"force\": true,\n \"dry_run\": true,\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}⌘I