Get monitor
curl --request GET \
--url https://api.trymaitai.ai/api/v1/monitors/{monitor_id} \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/monitors/{monitor_id}"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/monitors/{monitor_id}', 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.trymaitai.ai/api/v1/monitors/{monitor_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Maitai-Api-Key: <api-key>"
],
]);
$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 := "https://api.trymaitai.ai/api/v1/monitors/{monitor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Maitai-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trymaitai.ai/api/v1/monitors/{monitor_id}")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 501,
"name": "Order intake completeness",
"description": "Catches order intents that miss customer_id or order_total.",
"status": "ACTIVE",
"config": {
"runner": {
"resource_type": "model",
"resource_id": "gpt-4o-mini",
"input": {
"prompt": "Review this order. Reply JSON: {\"is_bad\": bool, \"reason\": str}.",
"messages_path": "messages",
"response_path": "response"
}
},
"result": {
"error": {
"id": "g_err",
"kind": "group",
"op": "OR",
"children": [
{
"id": "c1",
"kind": "condition",
"source": "json",
"path": "is_bad",
"operator": "is_true",
"value": ""
}
]
},
"warning": {
"id": "g_warn",
"kind": "group",
"op": "OR",
"children": []
},
"default_outcome": "pass"
}
},
"targets": [
{
"id": 9001,
"monitor_id": 501,
"target_type": "intent",
"target_id": 7,
"target_name": "order_intake",
"sample_rate": 5,
"enabled": true,
"active": true
}
],
"target_count": 1,
"latest_version_number": "1.2.0",
"has_unpublished_changes": false,
"last_run_at": 1737550000000
}
}Monitors
Get monitor
Retrieve a monitor by ID. Use include_targets=false to skip target loading.
GET
/
monitors
/
{monitor_id}
Get monitor
curl --request GET \
--url https://api.trymaitai.ai/api/v1/monitors/{monitor_id} \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/monitors/{monitor_id}"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/monitors/{monitor_id}', 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.trymaitai.ai/api/v1/monitors/{monitor_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Maitai-Api-Key: <api-key>"
],
]);
$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 := "https://api.trymaitai.ai/api/v1/monitors/{monitor_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Maitai-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trymaitai.ai/api/v1/monitors/{monitor_id}")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/monitors/{monitor_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 501,
"name": "Order intake completeness",
"description": "Catches order intents that miss customer_id or order_total.",
"status": "ACTIVE",
"config": {
"runner": {
"resource_type": "model",
"resource_id": "gpt-4o-mini",
"input": {
"prompt": "Review this order. Reply JSON: {\"is_bad\": bool, \"reason\": str}.",
"messages_path": "messages",
"response_path": "response"
}
},
"result": {
"error": {
"id": "g_err",
"kind": "group",
"op": "OR",
"children": [
{
"id": "c1",
"kind": "condition",
"source": "json",
"path": "is_bad",
"operator": "is_true",
"value": ""
}
]
},
"warning": {
"id": "g_warn",
"kind": "group",
"op": "OR",
"children": []
},
"default_outcome": "pass"
}
},
"targets": [
{
"id": 9001,
"monitor_id": 501,
"target_type": "intent",
"target_id": 7,
"target_name": "order_intake",
"sample_rate": 5,
"enabled": true,
"active": true
}
],
"target_count": 1,
"latest_version_number": "1.2.0",
"has_unpublished_changes": false,
"last_run_at": 1737550000000
}
}Was this page helpful?
⌘I