Skip to main content
POST
Preview an unsaved monitor's message

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-tenant-id
string
required

The organization ID the request is scoped to.

Body

application/json

Renders the message a monitor would send, before the monitor is saved.

monitor
MonitorCreate · object
required

The monitor to render, in the shape create takes. It is not saved.

partition_value
Partition Value · object | null

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.

format
enum<string>
default:raw

raw returns the rendered message: its metadata and each rendered section. email returns the HTML body of the email the monitor sends.

Available options:
raw,
email
theme
enum<string>
default:light

Whether charts are drawn for a light or a dark background.

Available options:
light,
dark

Response

Successful Response

The message a monitor would send, before a destination formats it.

metadata
MonitorPreviewMetadata · object
required

What the message is about, and the organization settings it renders with.

sections
(FormattedTitleSection · object | FormattedParagraphSection · object | FormattedChartSection · object | FormattedTableSection · object | FormattedCustomSQLResultsSection · object)[]
required

Formatted title section with rendered title.

Final title after applying partition formatting if applicable.

format
string
default:raw
read-only
Allowed value: "raw"