Need more detail? Connect your coding agent to the full docs.

Skip to Content
AMIRILDocs
/

Unit list

The Unit list routes of Amiril's HTTP API that an OAuth access token can call, with their parameters, request bodies and responses.

POST
/api/unit-list

Runs and every Agent System's work items under one query, 50 rows a page. Anomalies ranks each type by rarity, orders the merged rows by their rank within their own type, and splits them by review tab. Traces lists every unit newest first.

Any access token can call this, read-only or full.

Authorization

accessToken
headerAuthorizationBearer <JWT>

An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.

Request Body

application/json
  1. body
mode*string
Value in"anomalies""traces"
type*|null
systems?array<string>
Default[]
notSystems?array<string>
Default[]
agents?array<string>
Default[]
notAgents?array<string>
Default[]
versions?array<string>
Default[]
window*||null
tools?array<string>
Default[]
detectionType?|
Default"all"
minScore?|
Defaultnull
extremes?boolean
Defaultfalse
sharedIdValue?|
Defaultnull
cluster?|
Defaultnull
trackedFieldFilters?array<|>
Default[]
review?string
Default"to-review"
Value in"to-review""confirmed""normal"
issues?|
Defaultnull
blocked?boolean
Defaultfalse
sort*
page?integer
Range1 <= value <= 9007199254740991
Default1

Response Body

One page of the list

application/json
  1. response
rows*array<>
page*number
pageCount*number
total*number
showingFrom*number
showingTo*number
ceiling*|null
tabs*|null
coverage*|null
windowFrom*string|null
windowTo*string|null
newestEnd*string|null
scoring*boolean
clusterName*string|null
danglingAgent*boolean
danglingSystem*boolean
danglingDetectionType*boolean
Example Request
curl -X POST 'https://api.amiril.ai/api/unit-list' \  -H 'Content-Type: application/json' \  -d '{  "mode": "anomalies",  "type": "runs",  "window": {    "kind": "preset",    "preset": "1h"  },  "sort": {    "column": "score",    "dir": "asc"  }}'
Example Response200
{  "rows": [    {      "id": "string",      "grain": "runs",      "unit": "string",      "score": 0,      "scores": {        "top3": 0,        "sum": 0,        "mean": 0      },      "wholeRunScore": 0,      "singleEventScore": 0,      "anomalyClass": "whole_run",      "wholeRunAnomaly": true,      "singleEventAnomaly": true,      "findings": 0,      "status": "new",      "judgedCount": 0,      "review": "real",      "agentKey": "string",      "agentName": "string",      "summary": "string",      "headline": "string",      "topShare": 0,      "complete": true,      "startTs": "string",      "endTs": "string",      "scoredAt": "string",      "sectionId": "string",      "events": 0,      "toolCalls": 0,      "durationMs": 0,      "tokens": 0,      "cost": 0,      "errorCount": 0,      "models": [        "string"      ],      "runCount": 0,      "fields": {        "property1": "string",        "property2": "string"      },      "systemName": "string",      "systemLabel": "string",      "agentNames": [        "string"      ],      "agentKeys": [        "string"      ],      "badCluster": {        "key": "string",        "name": "string"      },      "turnReasons": [        {          "kind": "turn_cluster",          "role": "user",          "position": 0,          "cluster": {            "key": "string",            "name": "string"          }        }      ],      "badFacetClusters": [        {          "key": "string",          "name": "string"        }      ],      "turns": 0,      "succeeded": true,      "outcomeExpected": true,      "blockedCalls": 0    }  ],  "page": 0,  "pageCount": 0,  "total": 0,  "showingFrom": 0,  "showingTo": 0,  "ceiling": {    "ranked": 0,    "of": 0  },  "tabs": {    "toReview": 0,    "confirmed": 0,    "normal": 0  },  "coverage": {    "stoodOut": 0,    "units": 0  },  "windowFrom": "string",  "windowTo": "string",  "newestEnd": "string",  "scoring": true,  "clusterName": "string",  "danglingAgent": true,  "danglingSystem": true,  "danglingDetectionType": true}