curl --request POST \
--url https://api.select.dev/v2/monitors/actions/generate-title \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"target": "monitor",
"metric_title": "<string>",
"threshold": 123,
"filters": [
{}
],
"alert_type": "<string>",
"custom_sql_query": "<string>",
"cron": "<string>",
"query_class": "<string>"
}
'import requests
url = "https://api.select.dev/v2/monitors/actions/generate-title"
payload = {
"target": "monitor",
"metric_title": "<string>",
"threshold": 123,
"filters": [{}],
"alert_type": "<string>",
"custom_sql_query": "<string>",
"cron": "<string>",
"query_class": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
target: 'monitor',
metric_title: '<string>',
threshold: 123,
filters: [{}],
alert_type: '<string>',
custom_sql_query: '<string>',
cron: '<string>',
query_class: '<string>'
})
};
fetch('https://api.select.dev/v2/monitors/actions/generate-title', 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.select.dev/v2/monitors/actions/generate-title",
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([
'target' => 'monitor',
'metric_title' => '<string>',
'threshold' => 123,
'filters' => [
[
]
],
'alert_type' => '<string>',
'custom_sql_query' => '<string>',
'cron' => '<string>',
'query_class' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/monitors/actions/generate-title"
payload := strings.NewReader("{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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("https://api.select.dev/v2/monitors/actions/generate-title")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/monitors/actions/generate-title")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"title": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Generate a monitor title
Suggests a title for a monitor, or for one of its chart or table sections, from how it is configured; target says which. The title is written by a language model, and falls back to one built from data_source and the schedule or lookback if none can be generated. Nothing is saved. Requires monitors:write.
curl --request POST \
--url https://api.select.dev/v2/monitors/actions/generate-title \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"target": "monitor",
"metric_title": "<string>",
"threshold": 123,
"filters": [
{}
],
"alert_type": "<string>",
"custom_sql_query": "<string>",
"cron": "<string>",
"query_class": "<string>"
}
'import requests
url = "https://api.select.dev/v2/monitors/actions/generate-title"
payload = {
"target": "monitor",
"metric_title": "<string>",
"threshold": 123,
"filters": [{}],
"alert_type": "<string>",
"custom_sql_query": "<string>",
"cron": "<string>",
"query_class": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
target: 'monitor',
metric_title: '<string>',
threshold: 123,
filters: [{}],
alert_type: '<string>',
custom_sql_query: '<string>',
cron: '<string>',
query_class: '<string>'
})
};
fetch('https://api.select.dev/v2/monitors/actions/generate-title', 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.select.dev/v2/monitors/actions/generate-title",
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([
'target' => 'monitor',
'metric_title' => '<string>',
'threshold' => 123,
'filters' => [
[
]
],
'alert_type' => '<string>',
'custom_sql_query' => '<string>',
'cron' => '<string>',
'query_class' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/monitors/actions/generate-title"
payload := strings.NewReader("{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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("https://api.select.dev/v2/monitors/actions/generate-title")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/monitors/actions/generate-title")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target\": \"monitor\",\n \"metric_title\": \"<string>\",\n \"threshold\": 123,\n \"filters\": [\n {}\n ],\n \"alert_type\": \"<string>\",\n \"custom_sql_query\": \"<string>\",\n \"cron\": \"<string>\",\n \"query_class\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"title": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The organization ID the request is scoped to.
Body
- MonitorTitleForMonitor
- MonitorTitleForChart
- MonitorTitleForTable
A title for the monitor itself.
"monitor"The data the monitor reads.
account_spend, organization_spend, warehouse, account_usage_group, organization_usage_group, workload, custom, insights, storage, select_org_spend, databricks_workload, databricks_query, bigquery_workload, bigquery_query, bigquery_projects, bigquery_reservation, bigquery_storage, budget How often the monitor runs.
hourly, daily, weekly, monthly, cron The display name of the measure being reported on.
The threshold a condition trigger compares against. Ignored for any other alert_type.
The filters the query applies, each as {field, operator, value}.
The monitor's trigger type, such as condition, anomaly or digest.
The monitor's SQL. Read only when data_source is custom.
The monitor's cron expression. Read only when data_source is custom.
The query class the section's query runs against.
Response
Successful Response
A generated title.
The title, at most 120 characters.

