Add an alert rule
POST
An owner's own rule on a metric the evaluator reads (traffic.visits, errors.rate, latency.p95, revenue.cash, users.signups, errors.new_groups, ...) with a kind and its params (as for the PATCH). Its key is custom:<id>.
CustomerApiKeyheader
AuthorizationBearer <API Key>Customer API key sent as a bearer token
customer_id*stringFormat
uuidproject_id*stringFormat
uuidapplication/json- body
fire_at?integerDefault
3kind*stringmetric*stringparams?Document created, URL follows
application/json- response
incidents*array<>monitors?array<>rules*array<>site_id?|nullcurl -X POST 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/alerts/rules' \ -H 'Content-Type: application/json' \ -d '{ "kind": "string", "metric": "string"}'Example Response
{ "incidents": [ { "acked_at": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "metric": "string", "opened_at": "string", "resolved_at": "string", "rule_key": "string", "snapshot": {}, "state": "string", "summary": "string", "timeline": [ {} ], "title": "string", "trusted": true } ], "monitors": [ { "every_s": 0, "grace_s": 0, "last_fail_at": "string", "last_ok_at": "string", "name": "string" } ], "rules": [ { "fire_at": 0, "firing": true, "key": "string", "kind": "string", "last_value": 0, "metric": "string", "muted": true, "params": {}, "title": "string" } ], "site_id": "72771e6a-6f5e-4de4-a5b9-1266c4197811"}