Historical preview of a rule shape
Replay a rule shape (which may or may not be saved yet) against the last N days of data and return time-series buckets with threshold breaches + the exact number of notifications the state machine would have emitted.
Powers the chart in the rule editor: as the user tweaks metric, aggregation, threshold, window, filters or the re-notify cadence, the client re-calls this endpoint and re-renders the chart. Bucket size is always equal to the rule's evaluation window so each bucket's value represents one real evaluation.
Authorization
bearerAuth API token generated from the fastmon dashboard (Account → API Token). Send as Authorization: Bearer fm_... or paste the full token (including the fm_ prefix) into the Authorize dialog.
In: header
Path Parameters
uuidRequest Body
application/json
The rule shape to evaluate historically. No id; rule may not yet exist.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/notifications/preview" \ -H "Content-Type: application/json" \ -d '{ "scope_type": "site", "metric": "string", "aggregation": "string", "operator": "gt", "condition_type": "absolute", "threshold": 0, "window_seconds": 0 }'{ "buckets": [ { "ts": "2019-08-24T14:15:22Z", "value": 0, "is_breach": true, "is_fire": false } ], "breach_count": 0, "fire_count": 0, "unit": "string", "granularity": "string", "range_days": 0}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}