Dash0 acquires Polar Signals

Manage Alerting

Bulk create check rules

post/api/alerting/check-rules/bulk

Atomically create up to 1000 Prometheus alert rules in a single request. Create-only — every item produces a brand-new check rule. The public schema uses id as the user-defined origin; per-item resolution priority mirrors the single-rule POST handler (id → server-generated UUID with "api-" prefix). Any item whose resolved origin or id collides with an existing rule (including soft-deleted rules whose origin is still reserved by the unique constraint) is rejected with a per-item diagnostic.

If any item fails validation (PromQL, intervals, summary length, template functions, origin/id collision, etc.) the whole batch is rejected with a 400 that carries per-item diagnostics in the message; nothing is written. On any DB failure the entire batch is rolled back and 500 is returned. The endpoint is not idempotent — a successful batch retried verbatim will 400 on every item the second time.

This endpoint accepts request bodies up to 2 MB (vs. the 256 KB default for other endpoints) to accommodate batched payloads of up to 1000 rules per request.

Parameters 1

datasetqueryrequired

The dataset to deploy rules into. Required to prevent accidental deployment to the wrong dataset.

References Dataset

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

stringpattern "^[a-zA-Z0-9_-]{3,26}$"
bash
Sample request
1234567891011
curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/alerting/check-rules/bulk?dataset=default' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"name": "Example",
"expression": "up == 0"
}
]
}'

Request body required

object
PrometheusAlertRule[]required

Responses

All items were successfully created.

object
integerrequired

Number of check rules that were newly created.