Preview — pending review
This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.
Get an alert rule
Returns one live alert rule of the project; unknown or deleted is 404.
bearerTokenAuthorizationBearer <token>An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
alertRuleId*stringThe alert rule.
application/json- response
An alert rule of a project and its current evaluation state.
id*stringname*stringprovider*AlertRuleProviderSignal the rule evaluates. instance_state fires on an instance in ERROR; metric compares a VM metric of an instance with monitoring ON against a threshold. The vocabulary grows.
"instance_state""metric"target*A rule's tag selector and what it matches RIGHT NOW. matchedCount is resolved on every read, so it is true the moment an instance is tagged -- before the next evaluation has run -- while instances carries the per-instance state of the last evaluation.
condition*The effective window + for condition. The metric fields are present only on metric rules.
channelIds*array<string>Notification channels (same project) that receive FIRING and RESOLVED notifications.
enabled*booleanstate*AlertRuleStateEvaluation state. INSUFFICIENT_DATA before the first evaluation and while the signal has no data (e.g. the target was deleted).
"OK""FIRING""INSUFFICIENT_DATA"stateSince*stringISO-8601 time the rule entered its current state.
lastEvaluatedAt*|ISO-8601 time of the last evaluation; null before the first.
createdAt*stringcreatedBy*stringupdatedAt*stringcurl -X GET "https://example.com/scopes/string/observability/alert-rules/string"{ "id": "string", "name": "string", "provider": "instance_state", "target": { "kind": "instance_selector", "match": { "property1": "string", "property2": "string" }, "matchedCount": 0, "monitoringDisabledCount": 0, "instances": [ { "id": "string", "name": "string", "state": "OK", "stateSince": "string", "lastValue": 0, "lastEvaluatedAt": "string" } ] }, "condition": { "metric": "cpu.utilization", "aggregation": "avg", "comparator": "gt", "threshold": 0, "windowSeconds": 0, "forSeconds": 0 }, "channelIds": [ "string" ], "enabled": true, "state": "OK", "stateSince": "string", "lastEvaluatedAt": "string", "createdAt": "string", "createdBy": "string", "updatedAt": "string"}