Units
The Units routes of Amiril's HTTP API that an OAuth access token can call, with their parameters, request bodies and responses.
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.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
definitionId*stringdays?integer1 <= value <= 36530Lens aggregates
application/json- response
windowDays*numberfrom*string|nullto*string|nulloverTime*array<>scoreHistogram*|nullstats*recent*array<>curl -X GET 'https://api.amiril.ai/api/definitions/string/dashboard'{ "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 } ]}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.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
definitionId*stringdays?integer1 <= value <= 36530hours?integer1 <= value <= 8760field?stringfrom?stringto?stringBoard columns
application/json- response
windowDays*numberfrom*string|nullto*string|nullnewestEnd*string|nullfieldId*string|nullcolumns*array<>curl -X GET 'https://api.amiril.ai/api/definitions/string/board'{ "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 } ] } ]}