List templates
curl --request GET \
--url http://api.gu1.ai/automations/templates \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/automations/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/automations/templates', 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 => "http://api.gu1.ai/automations/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/automations/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/automations/templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/automations/templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAPI Reference
List templates
List read-only automation templates available in Gu1, including pre-built graphs and optional preconfiguration parameters you can apply when cloning into the visual builder.
GET
/
automations
/
templates
List templates
curl --request GET \
--url http://api.gu1.ai/automations/templates \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/automations/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/automations/templates', 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 => "http://api.gu1.ai/automations/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/automations/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/automations/templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/automations/templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEndpoint
GET https://api.gu1.ai/automations/templates
Response
200 β{ "templates": [ ... ] }
Each template includes:
| Field | Description |
|---|---|
code | Stable catalog code |
sortOrder | Gallery order |
automations | One or more automation payloads (same shape as POST /automations) |
visibility | Optional { showInTabs: ["realtime" | "scheduled"] } |
parameterDefinitions | Optional knobs for preconfiguration (path + mirrorPaths) before create |
Create from template
POST https://api.gu1.ai/automations/from-template
{
"code": "alert_created_email_notify",
"paramValues": {
"rule_external_ids": [],
"severities": ["HIGH", "CRITICAL"],
"recipient_emails": "ops@example.com",
"message_template": "alert_created_email"
}
}
paramValuesis optional. When the template definesparameterDefinitionswithrequired: true, missing values return 400.- Values are applied to both flat fields and graph node data via
mirrorPaths. - Example
alert_created_email_notifycreates a realtime automation:alert_createdβsend_push_notification(email). - Example
entity_monitoring_scheduledcreates a scheduled automation: cron βfetch_entities(filters) βrun_risk_matrix(chosen matrix).
Automations created from a template are always created disabled (
enabled: false), regardless of the template definition. Review the configuration and activate them with POST /automations/:id/toggle (or from the dashboard) when ready.Was this page helpful?