Admiral
Environments

List variables for an environment

GET
/api/v1/environments/{environment_id}/variables

Sensitive variable values are masked in the response.

Scope: var:read

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer admp_...

In: header

Path Parameters

environment_id*environment_id

The environment whose variables should be listed (UUID).

Formatuuid

Query Parameters

filter?filter

Filter expression to narrow results. Uses the Admiral filter DSL (see the API documentation for the full operator and predicate reference).

Filterable fields:

  • key: filter by variable key (supports prefix matching via ~=).
  • sensitive: filter by sensitivity flag.
  • type: filter by variable type (STRING, NUMBER, BOOLEAN, COMPLEX).
  • source: filter by source (USER, INFRASTRUCTURE).

Example: field['source'] = 'USER' AND field['sensitive'] = false

Lengthlength <= 1024
page_size?page_size

Maximum number of variables to return per page. Defaults to 50 when omitted or 0; must not exceed 100.

Formatint32
Range0 <= value <= 100
page_token?page_token

Opaque pagination token from a previous response.

Response Body

application/json

curl -X GET "https://api.admiral.io/api/v1/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/variables"
{  "variables": [    {      "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",      "key": "DATABASE_URL",      "value": "postgresql://db.internal:5432/inventory",      "sensitive": false,      "type": "VARIABLE_TYPE_STRING",      "description": "Primary database connection string for the inventory service.",      "application_id": "a1b2c3d4-5678-9abc-def0-1234567890ab",      "environment_id": "e5f6a7b8-9012-3cde-f456-789012345678",      "source": "VARIABLE_SOURCE_USER",      "created_by": {        "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "display_name": "Alex Chen",        "email": "[email protected]"      },      "created_at": "2025-09-16T12:00:00Z",      "updated_at": "2025-10-30T15:00:00Z"    }  ],  "next_page_token": "string"}