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

Skip to Content
AMIRILDocs
/

Environments

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

List environments

GET
/api/environments

The workspace's live environments, oldest first. Archived ones only with archived=include.

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.

Query Parameters

archived?string

Response Body

The workspace's environments

application/json
  1. response
environments*array<>
retentionDefaults*

Days of data kept without an override, by production flag. Null keeps data forever

Example Request
curl -X GET 'https://api.amiril.ai/api/environments'
Example Response200
{  "environments": [    {      "id": "string",      "name": "string",      "production": true,      "createdBy": "string",      "createdAt": "string",      "archivedAt": "string",      "retentionDays": -9007199254740991,      "effectiveRetentionDays": -9007199254740991,      "purgeAfter": "string",      "purgedAt": "string"    }  ],  "retentionDefaults": {    "production": -9007199254740991,    "nonProduction": -9007199254740991  }}
GET
/api/environments/usage

For each environment not yet purged, archived ones included: an estimate of the data it stores and when data last arrived. Read one environment at a time, for the environments list in Settings.

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

Usage per environment, oldest environment first

application/json
  1. response
usage*array<>
Example Request
curl -X GET 'https://api.amiril.ai/api/environments/usage'
Example Response200
{  "usage": [    {      "environment": "string",      "storedBytes": -9007199254740991,      "lastIngestAt": "string"    }  ]}