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

Skip to Content
AMIRILDocs
/

Imports

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

GET
/api/imports/trace-id-keys

The workspace's trace-id extraction map: each entry names an id and the Langfuse trace-metadata field that carries it. Mapped ids land on every event at parse time.

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.

Response Body

The map; {} until configured

application/json
  1. response
keys*
Example Request
curl -X GET 'https://api.amiril.ai/api/imports/trace-id-keys'
Example Response200
{  "keys": {    "property1": "string",    "property2": "string"  }}
GET
/api/imports/trace-metadata-candidates

Distinct attribute keys on the environment's stored root events, across every kept import โ€” the suggestions the mapping editor offers.

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.

Response Body

Metadata keys seen, with counts and a sample value

application/json
  1. response
candidates*array<>
Example Request
curl -X GET 'https://api.amiril.ai/api/imports/trace-metadata-candidates'
Example Response200
{  "candidates": [    {      "key": "string",      "traces": 0,      "distinct": 0,      "agents": 0,      "sample": "string"    }  ]}

List imports

GET
/api/imports

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.

Response Body

Imports, newest first

application/json
  1. response
imports*array<>
Example Request
curl -X GET 'https://api.amiril.ai/api/imports'
Example Response200
{  "imports": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "workspace": "string",      "filename": "string",      "kind": "upload",      "status": "uploading",      "dialect": "string",      "declaredSizeBytes": 0,      "actualSizeBytes": 0,      "bytesConsumed": 0,      "rowsParsed": 0,      "rowsInserted": 0,      "rowsQuarantined": 0,      "zonelessTimestampCount": 0,      "eventsByType": {        "property1": 0,        "property2": 0      },      "attempt": 0,      "parserVersion": "string",      "error": "string",      "timezone": "string",      "createdAt": "2019-08-24T14:15:22Z",      "uploadedAt": "2019-08-24T14:15:22Z",      "scoringStartedAt": "2019-08-24T14:15:22Z",      "completedAt": "2019-08-24T14:15:22Z",      "firstReadyAt": "2019-08-24T14:15:22Z",      "removedAt": "2019-08-24T14:15:22Z"    }  ]}

Start an import

POST
/api/imports

Creates the import row and a resumable upload session. PUT the file to uploadUrl, then confirm.

Needs a full access token. A read-only token is refused.

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
filename*string
Length1 <= length <= 300
sizeBytes*integer
Range0 < value <= 9007199254740991
timezone?string

IANA zone applied to timestamps that carry none; defaults to UTC

Length1 <= length <= 64

Response Body

Import created; upload session ready

application/json
  1. response
import*
uploadUrl*string
Formaturi
Example Request
curl -X POST 'https://api.amiril.ai/api/imports' \  -H 'Content-Type: application/json' \  -d '{  "filename": "string",  "sizeBytes": 1}'
Example Response
{  "import": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "workspace": "string",    "filename": "string",    "kind": "upload",    "status": "uploading",    "dialect": "string",    "declaredSizeBytes": 0,    "actualSizeBytes": 0,    "bytesConsumed": 0,    "rowsParsed": 0,    "rowsInserted": 0,    "rowsQuarantined": 0,    "zonelessTimestampCount": 0,    "eventsByType": {      "property1": 0,      "property2": 0    },    "attempt": 0,    "parserVersion": "string",    "error": "string",    "timezone": "string",    "createdAt": "2019-08-24T14:15:22Z",    "uploadedAt": "2019-08-24T14:15:22Z",    "scoringStartedAt": "2019-08-24T14:15:22Z",    "completedAt": "2019-08-24T14:15:22Z",    "firstReadyAt": "2019-08-24T14:15:22Z",    "removedAt": "2019-08-24T14:15:22Z"  },  "uploadUrl": "http://example.com"}

Confirm an upload

POST
/api/imports/{id}/confirm

Verifies the object landed whole, marks the import uploaded, and enqueues parsing. Idempotent.

Needs a full access token. A read-only token is refused.

Authorization

accessToken
headerAuthorizationBearer <JWT>

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

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Import confirmed

application/json
  1. response
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
workspace*string
filename*string
kind*string
Value in"upload""stream"
status*string
Value in"uploading""uploaded""parsing""scoring""completed""failed""streaming"
dialect*string|null
declaredSizeBytes*number
actualSizeBytes*number|null
bytesConsumed*number
rowsParsed*number
rowsInserted*number
rowsQuarantined*number
zonelessTimestampCount*number
eventsByType*|null
attempt*number
parserVersion*string|null
error*string|null
timezone*string
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
uploadedAt*|null
scoringStartedAt*|null
completedAt*|null
firstReadyAt*|null
removedAt*|null
Example Request
curl -X POST 'https://api.amiril.ai/api/imports/497f6eca-6276-4993-bfeb-53cbbbba6f08/confirm'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspace": "string",  "filename": "string",  "kind": "upload",  "status": "uploading",  "dialect": "string",  "declaredSizeBytes": 0,  "actualSizeBytes": 0,  "bytesConsumed": 0,  "rowsParsed": 0,  "rowsInserted": 0,  "rowsQuarantined": 0,  "zonelessTimestampCount": 0,  "eventsByType": {    "property1": 0,    "property2": 0  },  "attempt": 0,  "parserVersion": "string",  "error": "string",  "timezone": "string",  "createdAt": "2019-08-24T14:15:22Z",  "uploadedAt": "2019-08-24T14:15:22Z",  "scoringStartedAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z",  "firstReadyAt": "2019-08-24T14:15:22Z",  "removedAt": "2019-08-24T14:15:22Z"}

Get one import

GET
/api/imports/{id}

The dashboard polls this while an upload is parsing.

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

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Current import state

application/json
  1. response
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
workspace*string
filename*string
kind*string
Value in"upload""stream"
status*string
Value in"uploading""uploaded""parsing""scoring""completed""failed""streaming"
dialect*string|null
declaredSizeBytes*number
actualSizeBytes*number|null
bytesConsumed*number
rowsParsed*number
rowsInserted*number
rowsQuarantined*number
zonelessTimestampCount*number
eventsByType*|null
attempt*number
parserVersion*string|null
error*string|null
timezone*string
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
uploadedAt*|null
scoringStartedAt*|null
completedAt*|null
firstReadyAt*|null
removedAt*|null
Example Request
curl -X GET 'https://api.amiril.ai/api/imports/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspace": "string",  "filename": "string",  "kind": "upload",  "status": "uploading",  "dialect": "string",  "declaredSizeBytes": 0,  "actualSizeBytes": 0,  "bytesConsumed": 0,  "rowsParsed": 0,  "rowsInserted": 0,  "rowsQuarantined": 0,  "zonelessTimestampCount": 0,  "eventsByType": {    "property1": 0,    "property2": 0  },  "attempt": 0,  "parserVersion": "string",  "error": "string",  "timezone": "string",  "createdAt": "2019-08-24T14:15:22Z",  "uploadedAt": "2019-08-24T14:15:22Z",  "scoringStartedAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z",  "firstReadyAt": "2019-08-24T14:15:22Z",  "removedAt": "2019-08-24T14:15:22Z"}

Remove an import

DELETE
/api/imports/{id}

Excludes the upload from the environment's data and re-projects from the remaining kept files. Events shared with other uploads survive; the file itself is kept.

Needs a full access token. A read-only token is refused.

Authorization

accessToken
headerAuthorizationBearer <JWT>

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

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Import marked removed; re-projection queued

application/json
  1. response
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
workspace*string
filename*string
kind*string
Value in"upload""stream"
status*string
Value in"uploading""uploaded""parsing""scoring""completed""failed""streaming"
dialect*string|null
declaredSizeBytes*number
actualSizeBytes*number|null
bytesConsumed*number
rowsParsed*number
rowsInserted*number
rowsQuarantined*number
zonelessTimestampCount*number
eventsByType*|null
attempt*number
parserVersion*string|null
error*string|null
timezone*string
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
uploadedAt*|null
scoringStartedAt*|null
completedAt*|null
firstReadyAt*|null
removedAt*|null
Example Request
curl -X DELETE 'https://api.amiril.ai/api/imports/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspace": "string",  "filename": "string",  "kind": "upload",  "status": "uploading",  "dialect": "string",  "declaredSizeBytes": 0,  "actualSizeBytes": 0,  "bytesConsumed": 0,  "rowsParsed": 0,  "rowsInserted": 0,  "rowsQuarantined": 0,  "zonelessTimestampCount": 0,  "eventsByType": {    "property1": 0,    "property2": 0  },  "attempt": 0,  "parserVersion": "string",  "error": "string",  "timezone": "string",  "createdAt": "2019-08-24T14:15:22Z",  "uploadedAt": "2019-08-24T14:15:22Z",  "scoringStartedAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z",  "firstReadyAt": "2019-08-24T14:15:22Z",  "removedAt": "2019-08-24T14:15:22Z"}