Import multiple check rules in one batch
/api/import/check-rulesBulk variant of /api/import/check-rule. Atomically imports up to 1000
Prometheus alert rules into your organization with full editability
— the resulting rules behave like UI-created assets, not API-managed
ones, so they can be modified in the Dash0 UI afterwards. Intended for
one-time migrations rather than ongoing Infrastructure-as-Code
management.
Per-item id/origin resolution mirrors the single-rule import handler:
items without an id receive a server-generated UUID; items with an
id reuse it. Generated origins are not prefixed with api- and
the rules remain UI-editable.
Behaves like the regular bulk endpoint in every other respect: items are validated up-front, the whole batch is rejected on any item failure, nothing is written on rollback, and the endpoint is not idempotent. 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
datasetqueryThe associated dataset.
Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.
"^[a-zA-Z0-9_-]{3,26}$"Sample request1234567891011curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/import/check-rules' \--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \--header 'Content-Type: application/json' \--data-raw '{"items": [{"name": "Example","expression": "up == 0"}]}'
Request body required
Responses
All items were successfully imported.
Number of check rules that were newly created.