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

Skip to Content
AMIRILDocs
/

Units

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

GET
/api/definitions/{definitionId}/dashboard

Per-day unit counts with how many were anomalies, the rarity distribution, headline stats, and the latest units โ€” everything a dashboard view's widgets read about one lens. "run" is the built-in lens every workspace has.

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.

Path Parameters

definitionId*string

Query Parameters

days?integer
Range1 <= value <= 365
Default30

Response Body

Lens aggregates

application/json
  1. response
windowDays*number
from*string|null
to*string|null
overTime*array<>
scoreHistogram*|null
stats*
recent*array<>
Example Request
curl -X GET 'https://api.amiril.ai/api/definitions/string/dashboard'
Example Response
{  "windowDays": 0,  "from": "string",  "to": "string",  "overTime": [    {      "date": "string",      "units": 0,      "withEvidence": 0,      "anomalyCounts": {        "total": 0,        "wholeRun": 0,        "singleEvent": 0,        "both": 0      }    }  ],  "scoreHistogram": {    "edges": [      0    ],    "counts": [      0    ],    "scale": "linear",    "n": 0  },  "stats": {    "units": 0,    "withEvidence": 0,    "anomalyCounts": {      "total": 0,      "wholeRun": 0,      "singleEvent": 0,      "both": 0    },    "records": 0,    "judged": 0  },  "recent": [    {      "unitId": "string",      "agent": "string",      "endTs": "string",      "top3": 0,      "items": 0,      "complete": true    }  ]}

The unit board

GET
/api/definitions/{definitionId}/board

Units grouped into columns by one declared field's value, with how many anomalies in each column. The field defaults to the definition's first string field.

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.

Path Parameters

definitionId*string

Query Parameters

days?integer
Range1 <= value <= 365
Default30
hours?integer
Range1 <= value <= 8760
field?string
from?string
to?string

Response Body

Board columns

application/json
  1. response
windowDays*number
from*string|null
to*string|null
newestEnd*string|null
fieldId*string|null
columns*array<>
Example Request
curl -X GET 'https://api.amiril.ai/api/definitions/string/board'
Example Response
{  "windowDays": 0,  "from": "string",  "to": "string",  "newestEnd": "string",  "fieldId": "string",  "columns": [    {      "value": "string",      "units": 0,      "withEvidence": 0,      "anomalyCounts": {        "total": 0,        "wholeRun": 0,        "singleEvent": 0,        "both": 0      },      "topScore": 0,      "items": [        {          "unitId": "string",          "score": 0,          "rawScore": 0        }      ]    }  ]}