API reference

API reference · Recorder

List alert rules

GET/api/alertsSigned in session

Answer 200

Your rules, and the unit each metric is measured in.

Fields of the 200 answer
FieldTypeWhat it is
rulesarray of AlertRule
rules[].idinteger
rules[].namestring
rules[].metricstringOne of "spend", "error_rate", "ttft_p95".
rules[].thresholdintegerMicro USD, basis points, or milliseconds, by metric.
rules[].windowMinutesinteger
rules[].minSamplesintegerHow many requests the window needs before the number is believed.
rules[].scopeModelstring or null
rules[].scopeKeyIdinteger or null
rules[].enabledboolean
rules[].statestringOne of "ok", "firing".
rules[].lastValueinteger or nullNull when the last check found nothing to measure.
rules[].lastCheckedAtinteger or null
rules[].lastTriggeredAtinteger or null
rules[].createdAtinteger
rules[].updatedAtinteger
unitsobject

Errors

  • 401OpenAI 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