v3

OpenAPI 3.1.02026-07-31350397683.8 KB
Alerts

Create Alert

Create a new alert with optional agent associations

post/v1/create-alert

Headers

X-API-Keystring required

API key required to authenticate requests.

Request body

namestring required

Name of the alert

descriptionstring nullable

Description of the alert

is_enabledboolean

Whether the alert is enabled

entity_type'standard_metric' | 'custom_goal' | 'custom_metric' | 'metadata_field' | 'system_failure' required

Enum representing the entity types for alerts.

entity_fieldstring required

The specific field/metric being monitored

operator'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'greater_than_or_equal' | 'less_than_or_equal' | 'contains' | 'not_contains' required

Enum representing the comparison operators for alerts.

comparison_valuestring required

Value to compare against

applies_to_all_agentsboolean

Whether the alert applies to all agents

agent_idsinteger[] nullable

Agent IDs to associate with this alert (only used when applies_to_all_agents=False)

simulation_idinteger nullable

Optional experiments.id (simulation) to scope simulation alerts to. NULL means agent-scoped across all simulations.

evaluation_scope'per_test_result' | 'per_simulation_run' | 'per_simulation_run_window' nullable

How this alert is evaluated. Only 'per_simulation_run' is supported.

aggregation'none' | 'avg' | 'max' | 'min' | 'count' nullable

Aggregation mode used to compute the per-run metric value from test results within the run.

threshold_time_intervalinteger nullable

For observability source_scope: time window in seconds (default 600 if omitted). For simulation source_scope: K = number of recent completed runs (default 1 if omitted).

min_eventsinteger nullable

Minimum number of events for the alert. Only meaningful for observability/all source_scope (default 10 if omitted). Forced to NULL for simulation source_scope.

min_events_type'events' | 'percentage'

Whether min_events is an absolute count or a percentage of total events.

source_scope'all' | 'observability' | 'simulation'

Allowed data source scope for when an alert fires: all, observability only, or simulation only.

Response

Successful Response

idstring required

Unique identifier for the alert

namestring required

Name of the alert

descriptionstring nullable

Description of the alert

is_enabledboolean required

Whether the alert is enabled

organization_idstring required

Organization ID

entity_type'standard_metric' | 'custom_goal' | 'custom_metric' | 'metadata_field' | 'system_failure' required

Enum representing the entity types for alerts.

entity_fieldstring required

The specific field/metric being monitored

operator'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'greater_than_or_equal' | 'less_than_or_equal' | 'contains' | 'not_contains' required

Enum representing the comparison operators for alerts.

comparison_valuestring required

Value to compare against

last_triggered_atstring date-time nullable

When the alert was last triggered

trigger_countinteger required

Number of times triggered

created_bystring nullable

User who created the alert

applies_to_all_agentsboolean required

Whether the alert applies to all agents

agentsinteger[] nullable

Associated agent IDs

simulation_idinteger nullable

Optional experiments.id (simulation) this alert is scoped to

evaluation_scopestring nullable

How this alert is evaluated. Only 'per_simulation_run' is supported.

aggregationstring nullable

Aggregation mode used to compute the per-run metric value from test results within the run.

created_atstring date-time required

When the alert was created

updated_atstring date-time nullable

When the alert was last updated

updated_bystring nullable

User who last updated the alert

threshold_time_intervalinteger nullable required

For observability source_scope: time window in seconds. For simulation source_scope: K = number of recent completed runs.

min_eventsinteger nullable required

The minimum number of events for the alert. NULL for simulation alerts.

min_events_typestring

Whether min_events is an absolute count or a percentage

in_alertboolean required

Whether the alert is in alert

source_scopestring

Which data source fires this alert: 'all', 'observability', or 'simulation'

simulation_namestring nullable

Name of the simulation (experiment) this alert is scoped to, if any