Read a project's alerts
Use a key with only read scopes. Your customer_id is in the reply to Get the calling API key.
GET
The project's incidents (unresolved first, then the last 30 days) and its alert rules. An incident carries what fired (rule_key, metric), state (open, acked, resolved), trusted (only trusted data starts an automatic response), the firing snapshot (the window's value, baseline, change in percent, grain, deploys and error groups in range) and its timeline. A rule carries its condition (kind, params), how many consecutive samples fire it (fire_at), muted and whether it is firing. Numbers only, never error text. Owner, admin or API key.
CustomerApiKeyheader
AuthorizationBearer <API Key>Customer API key sent as a bearer token
customer_id*stringFormat
uuidproject_id*stringFormat
uuidRequest fulfilled, document follows
application/json- response
incidents*array<>monitors?array<>rules*array<>site_id?|nullcurl -X GET 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/alerts'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"}