curl --request POST \
--url https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"partition_value": {},
"format": "raw",
"theme": "light"
}
'import requests
url = "https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview"
payload = {
"partition_value": {},
"format": "raw",
"theme": "light"
}
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({partition_value: {}, format: 'raw', theme: 'light'})
};
fetch('https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview', 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/{monitor_id}/run-history/{run_id}/actions/preview",
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([
'partition_value' => [
],
'format' => 'raw',
'theme' => 'light'
]),
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/{monitor_id}/run-history/{run_id}/actions/preview"
payload := strings.NewReader("{\n \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\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/{monitor_id}/run-history/{run_id}/actions/preview")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview")
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 \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"snowflake_account_uuid": "<string>",
"snowflake_account_name": "<string>",
"currency": "<string>",
"trigger_config": {
"skip_if_empty": true,
"type": "digest"
},
"usage_group_sets": [
{}
],
"select_org_name": "<string>",
"snowflake_accounts": [
{}
],
"team_name": "<string>",
"trigger_details": {
"upper_bound": 123,
"lower_bound": 123,
"type": "condition"
},
"dbt_meta_keys": [
"<string>"
],
"dbt_top_level_keys": [
"<string>"
],
"custom_workload_meta_keys": [
"<string>"
],
"tag_keys": {},
"triggered_partition_row": {}
},
"sections": [
{
"config": {
"enabled": true,
"section_type": "TITLE"
},
"formatted_title": "<string>"
}
],
"format": "raw"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Preview a monitor's message for one of its runs
Renders the monitor’s title and paragraph sections as they read for the run, against the period the run evaluated, and sends nothing. The run stores its outcome but not its message, so the message is rendered again with the monitor’s current settings. A message template that fails to render is rejected, naming the template. A run that failed before reaching a period has no message and returns 409. Requires monitors:read.
curl --request POST \
--url https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"partition_value": {},
"format": "raw",
"theme": "light"
}
'import requests
url = "https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview"
payload = {
"partition_value": {},
"format": "raw",
"theme": "light"
}
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({partition_value: {}, format: 'raw', theme: 'light'})
};
fetch('https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview', 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/{monitor_id}/run-history/{run_id}/actions/preview",
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([
'partition_value' => [
],
'format' => 'raw',
'theme' => 'light'
]),
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/{monitor_id}/run-history/{run_id}/actions/preview"
payload := strings.NewReader("{\n \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\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/{monitor_id}/run-history/{run_id}/actions/preview")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/monitors/{monitor_id}/run-history/{run_id}/actions/preview")
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 \"partition_value\": {},\n \"format\": \"raw\",\n \"theme\": \"light\"\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"snowflake_account_uuid": "<string>",
"snowflake_account_name": "<string>",
"currency": "<string>",
"trigger_config": {
"skip_if_empty": true,
"type": "digest"
},
"usage_group_sets": [
{}
],
"select_org_name": "<string>",
"snowflake_accounts": [
{}
],
"team_name": "<string>",
"trigger_details": {
"upper_bound": 123,
"lower_bound": 123,
"type": "condition"
},
"dbt_meta_keys": [
"<string>"
],
"dbt_top_level_keys": [
"<string>"
],
"custom_workload_meta_keys": [
"<string>"
],
"tag_keys": {},
"triggered_partition_row": {}
},
"sections": [
{
"config": {
"enabled": true,
"section_type": "TITLE"
},
"formatted_title": "<string>"
}
],
"format": "raw"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Body
Renders a monitor's message as it read for one of its runs.
On a partitioned monitor, the partition to render the message for, as the partition_value a run reports for it: its values keyed by the dimension each partition column reads, e.g. {"usage_type": "compute"}. Null renders the monitor as a whole.
Show child attributes
Show child attributes
Response
Successful Response
- MonitorRawPreview
- MonitorEmailPreview
The message a monitor would send, before a destination formats it.
Formatted title section with rendered title.
Final title after applying partition formatting if applicable.
- FormattedTitleSection
- FormattedParagraphSection
- FormattedChartSection
- FormattedTableSection
- FormattedCustomSQLResultsSection
Show child attributes
Show child attributes

