API reference

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

Path and query parameters
FieldTypeWhat it is
id (path)requiredstring

Answer 200

The test.

Fields of the 200 answer
FieldTypeWhat it is
idstringshd_ and 24 hex digits.
object"shadow.test"
namestring
modelstring
scopestringOne of "key", "account".
key_idinteger or null
statusstringOne of "active", "stopped".
stopped_reasonstring or null
held_untilinteger or nullUnix seconds: the month's ceiling is reached, nothing runs before this.
sample_ratenumber
daily_capinteger
sampled_todayinteger
monthly_ceiling_microsinteger
month_spent_microsinteger
month_reserved_microsinteger
spent_microsinteger
compareobject
thresholdnumber
min_samplesinteger
candidatesarray of object
candidates[].modelstring
candidates[].suggestedboolean
switchobject or nullThe switch standing, if any: the candidate and the keys it routes.
switch.tostring
switch.key_idsarray of integer
switch.switched_atinteger
switch.autobooleanMade by the gateway under auto savings.
autoobjectAuto savings: whether the gateway may switch this test itself once a candidate is ready.
auto.enabledboolean
auto.enabled_atinteger or null
auto.switched_atinteger or null
auto.switched_tostring or null
auto.off_reasonstring or nullWhy it is off when it was on: turned off, reverted, or why a switch failed.
savingsarray of objectThe 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[].week_startinteger
savings[].fromstring
savings[].tostring
savings[].autoboolean
savings[].requestsinteger
savings[].cost_microsinteger
savings[].baseline_microsinteger
savings[].saved_microsinteger
savings[].rationumber
created_atinteger
updated_atinteger

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.

Antimatter