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 calls, hosted function runs and event publishes from an agent key are refused, and approved calls do not run. Approvals can still be decided, and reads still answer.

haltedAtstring<date-time> | nullrequired
haltedReasonstring | nullrequired
allowedRedirectUrlsstring[]

Where an end user's connect link may send them back to: each an origin plus a path prefix, matched exactly.

defaultRedirectUrlstring | null

The redirect a connect link uses when none is given, including the links in a 409. One of allowedRedirectUrls.

connectConfirmationstring

required: an end user's finished OAuth consent waits for your server to confirm it (the account-takeover defence). off only on an unprotected development environment.

Allowed:requiredoff
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
fixErrorFix

How to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.

Show properties
summarystringrequired

One sentence that says what to do.

commandstring

An exact anlyon CLI command that fixes it. Absent when no command does.

urlstring<uri>

An absolute console link where a person fixes it.

docsstring<uri>

A docs page that explains it.

404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

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

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
fixErrorFix

How to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.

Show properties
summarystringrequired

One sentence that says what to do.

commandstring

An exact anlyon CLI command that fixes it. Absent when no command does.

urlstring<uri>

An absolute console link where a person fixes it.

docsstring<uri>

A docs page that explains it.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/environment' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
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",
    "allowedRedirectUrls": [
      "string"
    ],
    "defaultRedirectUrl": "string",
    "connectConfirmation": "required",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

Was this page helpful?