config

Apply a monitors-as-code file (desired state)

Monitors as code. Send the YAML (Content-Type: application/x-yaml) or JSON (application/json) document from GET /api/v1/config, edited to the state you want. Monitors are matched by name:

  • missing monitors are created,
  • existing monitors get the fields present in the file updated (keys you leave out are untouched),
  • with ?prune=1, monitors not in the file are deleted (channels are never deleted),
  • ?dry_run=1 returns the plan without writing.

Every entry is validated first (same rules as the UI: plan limits, URL policy, cron syntax, assertion syntax, channel names). If anything fails the response is 422 with errors: [{name, error}] and nothing is applied.

Response: {"created": [...], "updated": [...], "deleted": [...], "unchanged": [...], "errors": [...], "dry_run": bool}. Requires a Business or Enterprise plan. Ideal for CI: run with dry_run=1 on pull requests, apply on merge.

put/api/v1/config

Request

  • Base URL: https://puzaricloud.in (the document declares no server; this is the origin it was published from)
  • URL: https://puzaricloud.in/api/v1/config
  • Auth: none declared

Query parameters

dry_runboolean

Validate and report the plan without writing anything

pruneboolean

Delete monitors that are not listed in the file

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.