---
title: "Dry-run an alert rule"
description: "Evaluates an unsaved rule once and returns the instances it would produce and its condition's series over the 6 hours before time. A content read: unrecorded, and checked as the caller like a create. 400 invalid_request with issues[] for every validation problem, each at its field's dotted path. 403 access_denied naming the missing action when the caller can't read what the condition reads (obs.metrics.query on the project for PromQL; obs.logs.search or obs.traces.search on the dataset). 422 rule_too_expensive. 404 while alerting isn't offered (the console hides Alerting then)."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Observability API

`POST /v1/organizations/{orgId}/projects/{projectId}/obs/alert-rules/test`

Evaluates an unsaved rule once and returns the instances it would produce and its condition's series over the 6 hours before time. A content read: unrecorded, and checked as the caller like a create. 400 invalid_request with issues[] for every validation problem, each at its field's dotted path. 403 access_denied naming the missing action when the caller can't read what the condition reads (obs.metrics.query on the project for PromQL; obs.logs.search or obs.traces.search on the dataset). 422 rule_too_expensive. 404 while alerting isn't offered (the console hides Alerting then).

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `TestAlertRule.path.orgId` (string, required)
  - format `uuid`
- `TestAlertRule.path.projectId` (string, required)
  - format `uuid`

## Request body

_Required._

- `TestAlertRule.rule` (object, required) — An alert rule. Unknown fields are refused.
  - `TestAlertRule.rule.condition` (object, required) — Exactly one of promql, logs and traces.
    - `TestAlertRule.rule.condition.logs` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
      - `TestAlertRule.rule.condition.logs.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
        - `TestAlertRule.rule.condition.logs.aggregate.fn` (string, required)
        - `TestAlertRule.rule.condition.logs.aggregate.field` (unknown, optional)
      - `TestAlertRule.rule.condition.logs.dataset` (string, required)
        - format `uuid`
      - `TestAlertRule.rule.condition.logs.threshold` (object, required)
        - `TestAlertRule.rule.condition.logs.threshold.op` (string, required)
          - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
        - `TestAlertRule.rule.condition.logs.threshold.value` (number, required)
      - `TestAlertRule.rule.condition.logs.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
      - `TestAlertRule.rule.condition.logs.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
      - `TestAlertRule.rule.condition.logs.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
        - `TestAlertRule.rule.condition.logs.groupBy.field` (unknown, required)
    - `TestAlertRule.rule.condition.promql` (object, optional)
      - `TestAlertRule.rule.condition.promql.expr` (string, required) — A PromQL expression returning an instant vector, with its comparison: every series it returns is an active instance. Ranges, subquery ranges and offsets add up to at most 1h along any path; @ isn't allowed.
        - maxLength 8192
    - `TestAlertRule.rule.condition.traces` (object, optional) — A logs or traces aggregate over [t − window, t); each group whose value satisfies the threshold is an active instance.
      - `TestAlertRule.rule.condition.traces.aggregate` (object, required) — One aggregation, as a dashboard panel's: {fn, field?}.
        - `TestAlertRule.rule.condition.traces.aggregate.fn` (string, required)
        - `TestAlertRule.rule.condition.traces.aggregate.field` (unknown, optional)
      - `TestAlertRule.rule.condition.traces.dataset` (string, required)
        - format `uuid`
      - `TestAlertRule.rule.condition.traces.threshold` (object, required)
        - `TestAlertRule.rule.condition.traces.threshold.op` (string, required)
          - one of `">"`, `">="`, `"<"`, `"<="`, `"=="`, `"!="`
        - `TestAlertRule.rule.condition.traces.threshold.value` (number, required)
      - `TestAlertRule.rule.condition.traces.window` (string, required) — The aggregate's window, ending at the evaluation time: 1m to 15m in whole minutes.
      - `TestAlertRule.rule.condition.traces.filter` (object, optional) — The dashboard panel's filter: logs' filters (LogFilters) or traces' (TraceFilters), kept as sent (stored as JSON: key order and number spelling may be normalized). Default {}.
      - `TestAlertRule.rule.condition.traces.groupBy` (array<object>, optional) — At most 2 fields; at most 50 groups are evaluated (more is a rule error).
        - `TestAlertRule.rule.condition.traces.groupBy.field` (unknown, required)
  - `TestAlertRule.rule.name` (string, required)
    - minLength 1; maxLength 100
  - `TestAlertRule.rule.annotations` (map<string>, optional) — Templates (Prometheus's alerting template language, without query, range or template; at most 4 KiB each, 16 in all), rendered per instance with $labels and $value.
  - `TestAlertRule.rule.contactPoints` (array<string>, optional) — 0 to 10 contact point IDs of the project. Default none (the rule still evaluates and keeps state).
    - format `uuid`
  - `TestAlertRule.rule.description` (string, optional)
    - maxLength 1000
  - `TestAlertRule.rule.enabled` (boolean, optional) — Off: the rule isn't evaluated and has no instances. Default true.
  - `TestAlertRule.rule.for` (string, optional) — How long the condition must hold before an instance fires: 0 to 24h in whole minutes. Default 0.
  - `TestAlertRule.rule.keepFiringFor` (string, optional) — How long a firing instance keeps firing after the condition stops holding: 0 to 24h in whole minutes. Default 0.
  - `TestAlertRule.rule.labels` (map<string>, optional) — Static labels on every instance (at most 32). alertname, ezgh_* and __* are reserved.
  - `TestAlertRule.rule.noData` (string, optional) — Logs and traces conditions whose aggregate returns no groups: ok (nothing active), alerting (one active instance) or noData (one instance in the noData state). Default noData. PromQL ignores it: use absent().
    - one of `"ok"`, `"alerting"`, `"noData"`
  - `TestAlertRule.rule.notifyOnResolve` (boolean, optional) — Notify when instances resolve. Default true.
  - `TestAlertRule.rule.onError` (string, optional) — A rule error (the engine refuses the query, more than 1,000 instances, a budget exceeded): error puts the rule in the error state and notifies; ok records it without notifying. Default error. EZGH's own failures never notify.
    - one of `"error"`, `"ok"`
  - `TestAlertRule.rule.repeatInterval` (string, optional) — How often a still-firing rule notifies again: 5m to 7d. Default 4h.
- `TestAlertRule.time` (string, optional) — Evaluate at this time (default now, less the evaluation freshness offset).
  - format `date-time`

## Example request

```json
{
  "rule": {
    "annotations": {
      "property1": "string",
      "property2": "string"
    },
    "condition": {
      "logs": {
        "aggregate": {
          "field": null,
          "fn": "string"
        },
        "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
        "filter": {},
        "groupBy": [
          {
            "field": null
          }
        ],
        "threshold": {
          "op": ">",
          "value": 0
        },
        "window": "string"
      }
    },
    "contactPoints": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "description": "string",
    "enabled": true,
    "for": "string",
    "keepFiringFor": "string",
    "labels": {
      "property1": "string",
      "property2": "string"
    },
    "name": "string",
    "noData": "ok",
    "notifyOnResolve": true,
    "onError": "error",
    "repeatInterval": "string"
  },
  "time": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/test \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rule": {
    "annotations": {
      "property1": "string",
      "property2": "string"
    },
    "condition": {
      "logs": {
        "aggregate": {
          "field": null,
          "fn": "string"
        },
        "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
        "filter": {},
        "groupBy": [
          {
            "field": null
          }
        ],
        "threshold": {
          "op": ">",
          "value": 0
        },
        "window": "string"
      }
    },
    "contactPoints": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "description": "string",
    "enabled": true,
    "for": "string",
    "keepFiringFor": "string",
    "labels": {
      "property1": "string",
      "property2": "string"
    },
    "name": "string",
    "noData": "ok",
    "notifyOnResolve": true,
    "onError": "error",
    "repeatInterval": "string"
  },
  "time": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/test';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    rule: {
      annotations: {property1: 'string', property2: 'string'},
      condition: {
        logs: {
          aggregate: {field: null, fn: 'string'},
          dataset: 'd93f2be0-02b1-4d87-8b6e-fc5cba21ed8d',
          filter: {},
          groupBy: [{field: null}],
          threshold: {op: '>', value: 0},
          window: 'string'
        }
      },
      contactPoints: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
      description: 'string',
      enabled: true,
      for: 'string',
      keepFiringFor: 'string',
      labels: {property1: 'string', property2: 'string'},
      name: 'string',
      noData: 'ok',
      notifyOnResolve: true,
      onError: 'error',
      repeatInterval: 'string'
    },
    time: '2019-08-24T14:15:22Z'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://obs.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/obs/alert-rules/test"

payload = {
    "rule": {
        "annotations": {
            "property1": "string",
            "property2": "string"
        },
        "condition": { "logs": {
                "aggregate": {
                    "field": None,
                    "fn": "string"
                },
                "dataset": "d93f2be0-02b1-4d87-8b6e-fc5cba21ed8d",
                "filter": {},
                "groupBy": [{ "field": None }],
                "threshold": {
                    "op": ">",
                    "value": 0
                },
                "window": "string"
            } },
        "contactPoints": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
        "description": "string",
        "enabled": True,
        "for": "string",
        "keepFiringFor": "string",
        "labels": {
            "property1": "string",
            "property2": "string"
        },
        "name": "string",
        "noData": "ok",
        "notifyOnResolve": True,
        "onError": "error",
        "repeatInterval": "string"
    },
    "time": "2019-08-24T14:15:22Z"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The dry run.

#### Example

```json
{
  "instances": [
    {
      "activeAt": "2019-08-24T14:15:22Z",
      "annotations": {
        "property1": "string",
        "property2": "string"
      },
      "distinctLabels": {
        "property1": "string",
        "property2": "string"
      },
      "fingerprint": "string",
      "firedAt": "2019-08-24T14:15:22Z",
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "lastActiveAt": "2019-08-24T14:15:22Z",
      "owner": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "kind": "string",
        "name": "string",
        "slug": "string"
      },
      "resolvedAt": "2019-08-24T14:15:22Z",
      "silencedBy": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "state": "string",
      "tier": "string",
      "value": 0
    }
  ],
  "readBytes": 0,
  "readRows": 0,
  "series": [
    {
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "points": [
        [
          0,
          0
        ]
      ]
    }
  ],
  "warnings": [
    "string"
  ]
}
```

- `TestAlertRule.response.200.instances` (array<object>, required) — The instances the rule would have at time, as if newly active: pending, or firing when for is 0.
  - `TestAlertRule.response.200.instances.activeAt` (string, required) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
    - format `date-time`
  - `TestAlertRule.response.200.instances.annotations` (map<string>, required) — Rendered.
  - `TestAlertRule.response.200.instances.distinctLabels` (map<string>, required) — labels without those every instance of its group (its rule, or SLO tier, under the list's filters) shares.
  - `TestAlertRule.response.200.instances.fingerprint` (string, required) — 16 hex digits: the hash of the instance's labels.
  - `TestAlertRule.response.200.instances.firedAt` (string | null, required)
    - format `date-time`
  - `TestAlertRule.response.200.instances.labels` (map<string>, required)
  - `TestAlertRule.response.200.instances.lastActiveAt` (string, required) — UTC, millisecond precision: 2026-10-02T10:20:00.000Z.
    - format `date-time`
  - `TestAlertRule.response.200.instances.owner` (object, required)
    - `TestAlertRule.response.200.instances.owner.id` (string, required)
      - format `uuid`
    - `TestAlertRule.response.200.instances.owner.kind` (string, required) — rule or slo.
    - `TestAlertRule.response.200.instances.owner.name` (string, required)
    - `TestAlertRule.response.200.instances.owner.slug` (string, required) — alr_… or slo_… (empty in a dry run's instances).
  - `TestAlertRule.response.200.instances.resolvedAt` (string | null, required)
    - format `date-time`
  - `TestAlertRule.response.200.instances.silencedBy` (array<string>, required) — The active silences that mute it.
    - format `uuid`
  - `TestAlertRule.response.200.instances.state` (string, required) — pending, firing, noData or resolved (kept 15 minutes): the underlying state; a silenced one has silencedBy.
  - `TestAlertRule.response.200.instances.value` (number | null, required)
  - `TestAlertRule.response.200.instances.tier` (string, optional) — An SLO's tier: page or ticket.
- `TestAlertRule.response.200.readBytes` (integer, required)
- `TestAlertRule.response.200.readRows` (integer, required)
- `TestAlertRule.response.200.series` (array<object>, required)
  - `TestAlertRule.response.200.series.labels` (map<string>, required)
  - `TestAlertRule.response.200.series.points` (array<array<unknown>>, required) — [unixSeconds, value or null], one a minute over the 6 hours before time.
- `TestAlertRule.response.200.warnings` (array<string>, required) — sampledData, noContactPoints, and seriesUnavailable when the chart couldn't be drawn. More codes may be added.

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.400.error` (object, required)
  - `TestAlertRule.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.400.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.400.error.issues.message` (string, required)
    - `TestAlertRule.response.400.error.issues.path` (string, required)
  - `TestAlertRule.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.400.error.quota.id` (string, required)
    - `TestAlertRule.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.400.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.400.error.quota.region` (string, optional)
    - `TestAlertRule.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.400.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.400.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.401.error` (object, required)
  - `TestAlertRule.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.401.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.401.error.issues.message` (string, required)
    - `TestAlertRule.response.401.error.issues.path` (string, required)
  - `TestAlertRule.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.401.error.quota.id` (string, required)
    - `TestAlertRule.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.401.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.401.error.quota.region` (string, optional)
    - `TestAlertRule.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.401.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.401.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.403.error` (object, required)
  - `TestAlertRule.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.403.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.403.error.issues.message` (string, required)
    - `TestAlertRule.response.403.error.issues.path` (string, required)
  - `TestAlertRule.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.403.error.quota.id` (string, required)
    - `TestAlertRule.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.403.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.403.error.quota.region` (string, optional)
    - `TestAlertRule.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.403.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.403.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.404.error` (object, required)
  - `TestAlertRule.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.404.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.404.error.issues.message` (string, required)
    - `TestAlertRule.response.404.error.issues.path` (string, required)
  - `TestAlertRule.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.404.error.quota.id` (string, required)
    - `TestAlertRule.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.404.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.404.error.quota.region` (string, optional)
    - `TestAlertRule.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.404.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.404.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 409

quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.409.error` (object, required)
  - `TestAlertRule.response.409.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.409.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.409.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.409.error.issues.message` (string, required)
    - `TestAlertRule.response.409.error.issues.path` (string, required)
  - `TestAlertRule.response.409.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.409.error.quota.id` (string, required)
    - `TestAlertRule.response.409.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.409.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.409.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.409.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.409.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.409.error.quota.region` (string, optional)
    - `TestAlertRule.response.409.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.409.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.409.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.409.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 413

payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.413.error` (object, required)
  - `TestAlertRule.response.413.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.413.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.413.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.413.error.issues.message` (string, required)
    - `TestAlertRule.response.413.error.issues.path` (string, required)
  - `TestAlertRule.response.413.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.413.error.quota.id` (string, required)
    - `TestAlertRule.response.413.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.413.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.413.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.413.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.413.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.413.error.quota.region` (string, optional)
    - `TestAlertRule.response.413.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.413.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.413.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.413.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.429.error` (object, required)
  - `TestAlertRule.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.429.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.429.error.issues.message` (string, required)
    - `TestAlertRule.response.429.error.issues.path` (string, required)
  - `TestAlertRule.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.429.error.quota.id` (string, required)
    - `TestAlertRule.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.429.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.429.error.quota.region` (string, optional)
    - `TestAlertRule.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.429.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.429.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.500.error` (object, required)
  - `TestAlertRule.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.500.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.500.error.issues.message` (string, required)
    - `TestAlertRule.response.500.error.issues.path` (string, required)
  - `TestAlertRule.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.500.error.quota.id` (string, required)
    - `TestAlertRule.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.500.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.500.error.quota.region` (string, optional)
    - `TestAlertRule.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.500.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.500.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `TestAlertRule.response.503.error` (object, required)
  - `TestAlertRule.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `TestAlertRule.response.503.error.message` (string, required)
    - maxLength 1024
  - `TestAlertRule.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `TestAlertRule.response.503.error.issues.message` (string, required)
    - `TestAlertRule.response.503.error.issues.path` (string, required)
  - `TestAlertRule.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `TestAlertRule.response.503.error.quota.id` (string, required)
    - `TestAlertRule.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `TestAlertRule.response.503.error.quota.limit` (integer, required)
      - min 0
    - `TestAlertRule.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `TestAlertRule.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `TestAlertRule.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.503.error.quota.region` (string, optional)
    - `TestAlertRule.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `TestAlertRule.response.503.error.quota.scopeResourceName` (string, optional)
    - `TestAlertRule.response.503.error.quota.used` (integer, optional)
      - min 0
    - `TestAlertRule.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/obs-api/TestAlertRule/index.md
