Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Get this key's environment

The environment this API key is bound to, including whether it is currently halted.

GET/api/v2/environment
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

A single environment.

successbooleanrequired
Allowed:true
dataEnvironmentrequired
Show properties
idstring<uuid>required
kindstring
Allowed:developmentstagingproduction
namestringrequired
slugstringrequired
isDefaultbooleanrequired

The environment new keys and resources default to.

isProtectedbooleanrequired

Production protection for destructive and promotion actions.

haltedbooleanrequired

Kill switch: while true the agent cannot act and nothing leaves the environment -- action invocations are blocked, deliveries defer, workflow steps pause, and writes to memory, files, sessions, cache and Connect are refused. Publishes still queue, approvals can still be decided, and reads still answer.

haltedAtstring<date-time> | nullrequired
haltedReasonstring | nullrequired
createdAtstring<date-time>required
updatedAtstring<date-time>required
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/environment' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "kind": "development",
    "name": "string",
    "slug": "string",
    "isDefault": true,
    "isProtected": true,
    "halted": true,
    "haltedAt": "2019-08-24T14:15:22Z",
    "haltedReason": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}