API reference · Account
One of the account's shadow tests
GET/api/account/shadow/{id}Signed in session
A 404 at every path while the operator has not turned shadow testing on.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string |
Answer 200
The test.
| Field | Type | What it is |
|---|---|---|
| id | string | shd_ and 24 hex digits. |
| object | "shadow.test" | |
| name | string | |
| model | string | |
| scope | string | One of "key", "account". |
| key_id | integer or null | |
| status | string | One of "active", "stopped". |
| stopped_reason | string or null | |
| held_until | integer or null | Unix seconds: the month's ceiling is reached, nothing runs before this. |
| sample_rate | number | |
| daily_cap | integer | |
| sampled_today | integer | |
| monthly_ceiling_micros | integer | |
| month_spent_micros | integer | |
| month_reserved_micros | integer | |
| spent_micros | integer | |
| compare | object | |
| threshold | number | |
| min_samples | integer | |
| candidates | array of object | |
| candidates[] | string | |
| candidates[] | boolean | |
| switch | object or null | The switch standing, if any: the candidate and the keys it routes. |
| switch. | string | |
| switch. | array of integer | |
| switch. | integer | |
| switch. | boolean | Made by the gateway under auto savings. |
| auto | object | Auto savings: whether the gateway may switch this test itself once a candidate is ready. |
| auto. | boolean | |
| auto. | integer or null | |
| auto. | integer or null | |
| auto. | string or null | |
| auto. | string or null | Why it is off when it was on: turned off, reverted, or why a switch failed. |
| savings | array of object | The newest weekly reports (Monday to Monday, UTC) of what a standing switch saved: the requests it moved, read from their usage rows, what they were billed, and what they would have cost on the original at the report's measured cost ratio. |
| savings[] | integer | |
| savings[] | string | |
| savings[] | string | |
| savings[] | boolean | |
| savings[] | integer | |
| savings[] | integer | |
| savings[] | integer | |
| savings[] | integer | |
| savings[] | number | |
| created_at | integer | |
| updated_at | integer |
Errors
- 401OpenAI shaped error.
- 404OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.