AI Objectives

Declared "keep this true" goals for your account. You state an objective — for example, keep p95 latency under 300 ms on an endpoint, or keep the error rate under 1% — and a reconciler evaluates it on a rolling window. When an objective is breached it either records the breach (observe), raises an Iris nudge that pre-seeds the assistant to diagnose and fix it (nudge), or — once autonomy is enabled for an actionable type — applies a dry-run-clean fix automatically (auto). Recovered objectives clear themselves.

Objectives are distinct from SLO targets (which drive the SLI display): objectives are multi-type, can be scoped to a single endpoint, and are actionable.

Account scope + permissions: objectives belong to your active account and require the traffic-inspector permission (read to list, write to change). Endpoint-scoped latency/error objectives need traffic capture enabled on that endpoint, otherwise they read back as insufficient data and never false-breach.

Objective types

latency_p95
p95 request latency (ms) over the window. Diagnose-only (origin fix) — auto not allowed.
error_rate
Percent of requests that errored (4xx/5xx excluding firewall/rate-limit blocks). Diagnose-only.
usage_cap
Percent of the account's data cap consumed. Diagnose-only.
cert_freshness
Minimum days until a certificate expires. Auto-eligible.
auto_block_score
Standing "block above reputation score" posture. Auto-eligible.
availability
Availability percentage.

List Objectives

GET/v1/account/objectives

Returns the account's declared objectives under an objectives array, ordered by objective_type. The list is not paginated.

Response (200 OK)

objectives object[]
The account's objectives. Always present; [] when none are declared.
objectives[].uuid string (uuid)
The objective's public id. Use it in PUT / DELETE /v1/account/objectives/{uuid}.
objectives[].account_uuid string (uuid)
The account the objective belongs to.
objectives[].scope string
account or endpoint.
objectives[].endpoint_uuid string (uuid)?
The endpoint an endpoint-scoped objective watches. Omitted for account-scoped objectives.
objectives[].objective_type, comparator, target_value, target_unit, window_seconds, min_samples, autonomy_link, enabled
As set on create / update (see the request body below).
objectives[].source string
Who declared it: user (this API or the dashboard) or iris (the AI assistant).
objectives[].created_by_uuid string (uuid)?
The user who declared it. Omitted when unset.
objectives[].last_state string
The latest verdict of the reconciler: ok | breach | insufficient_data | unknown (not evaluated yet).
objectives[].last_evaluated_at datetime?
When the reconciler last evaluated it. Omitted until the first evaluation.
objectives[].in_breach_since datetime?
When the current breach started. Omitted when the objective is not in breach.
objectives[].created_at, updated_at datetime
RFC 3339 UTC timestamps.

Create an Objective

POST/v1/account/objectives

Declares a new objective. The tuple (type, scope, endpoint) is unique per account — a duplicate returns 409.

Request body

objective_type string Req
One of the types above.
scope string
account (default) or endpoint.
endpoint_uuid string (uuid)
The endpoint's uuid. Required when scope=endpoint; must be an endpoint of the active account.
comparator string Req
The desired relation: lt | lte | gt | gte (e.g. keep latency lt 300).
target_value float Req
The threshold, e.g. 300 (ms), 1.0 (%), 7 (days).
target_unit string
Display unit: ms | pct | days | score.
window_seconds int
Evaluation window. Defaults to 3600.
min_samples int
Minimum requests before the window is judged (no false breach on thin data). Defaults to 50.
autonomy_link string Req
observe | nudge | auto. auto is rejected for diagnose-only types and requires the ai_autonomy entitlement.
enabled bool
Whether the reconciler evaluates it.

Deprecated: endpoint_id (integer) is still accepted until the sunset. Send endpoint_uuid; sending both for different objects is a 400 id_uuid_mismatch.

Response (201 Created): the objective as stored, read back after the write, in the list-entry shape above: its uuid, source (user), created_by_uuid, its evaluation state (last_state is unknown until the first evaluation) and created_at / updated_at.

The objective carries uuid, account_uuid, endpoint_uuid (endpoint scope) and created_by_uuid. Deprecated: until the sunset it also carries the legacy integer id and *_id fields. Don't use them.

Update / Delete an Objective

PUT/v1/account/objectives/{uuid}
DELETE/v1/account/objectives/{uuid}

PUT tunes an objective's parameters (its type, scope and endpoint are immutable — they form the unique target) and answers 200 with the objective as stored, in the list-entry shape (its source, created_by_uuid, evaluation state and timestamps included). DELETE removes it. Both return 404 for an unknown UUID.

Errors

400 Bad Request
Invalid type/comparator/autonomy_link, auto on a diagnose-only type, a missing endpoint_uuid for an endpoint scope, an endpoint_uuid that is not a uuid, or endpoint_id and endpoint_uuid naming different endpoints (id_uuid_mismatch).
403 Forbidden
Missing traffic-inspector permission, or auto without the ai_autonomy entitlement.
404 / 409
404 unknown objective (PUT/DELETE), or an endpoint_uuid that is not an endpoint of the active account; 409 an objective already exists for that (type, scope, endpoint).
Request — create
curl -X POST "https://api.ngris.com/v1/account/objectives" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "scope": "endpoint", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "objective_type": "latency_p95", "comparator": "lt", "target_value": 300, "target_unit": "ms", "window_seconds": 3600, "autonomy_link": "nudge", "enabled": true }'
Response — create (201 Created)
{ "uuid": "019c2458-02f1-7f38-97da-505d763b6908", "account_uuid": "019a68b9-1a79-7820-a884-41f554aba6bd", "scope": "endpoint", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "objective_type": "latency_p95", "comparator": "lt", "target_value": 300, "target_unit": "ms", "window_seconds": 3600, "min_samples": 50, "autonomy_link": "nudge", "enabled": true, "source": "user", "created_by_uuid": "019a52c2-ca1e-78ba-ab5c-50362cc29134", "last_state": "unknown", "created_at": "2026-10-19T14:02:11Z", "updated_at": "2026-10-19T14:02:11Z" }
Request — list
curl -X GET "https://api.ngris.com/v1/account/objectives" \ -H "X-API-KEY: <your_api_key>"
Response — list (200 OK)
{ "objectives": [ { "uuid": "019c2458-02f1-7f38-97da-505d763b6908", "account_uuid": "019a68b9-1a79-7820-a884-41f554aba6bd", "scope": "endpoint", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "objective_type": "latency_p95", "comparator": "lt", "target_value": 300, "target_unit": "ms", "window_seconds": 3600, "min_samples": 50, "autonomy_link": "nudge", "enabled": true, "source": "user", "created_by_uuid": "019a52c2-ca1e-78ba-ab5c-50362cc29134", "last_evaluated_at": "2026-10-20T09:15:00Z", "last_state": "ok", "created_at": "2026-10-19T14:02:11Z", "updated_at": "2026-10-19T14:02:11Z" } ] }
Request — delete
curl -X DELETE "https://api.ngris.com/v1/account/objectives/019c2458-02f1-7f38-97da-505d763b6908" \ -H "X-API-KEY: <your_api_key>"
Was this helpful?
On this page
AI Objectives
Was this helpful?