Skip to main content
Alerting & Response/Alert Templates

RenderAlertTemplate

Render a template with sample data to preview the output

POST/api/v1/alerting/templates/render

Operation ID

RenderAlertTemplate

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • content
    StringRequired

    Template content to render

    Example: # Alert: {{.AlertName}}

  • format
    StringRequired

    Template format for rendering

    Example: markdown

  • payload
    StringRequired

    JSON payload data for template variable substitution

    Example: {"AlertName": "High CPU"}

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • output
    String

    Rendered template output

    Example: # Alert: High CPU

  • error
    String

    Error message if rendering failed

    Example: connection refused