Admiral

Environments

List environments

GET
/v1/environments

Scope: env:read

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...

In: header

Query Parameters

application_id?application_id

The application to list environments of. Omitted lists every environment the caller can see, across applications.

Match^app-[0-9a-z]+$
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:

  • name: filter by environment name.
  • labels.key: filter by label key.

Example: field['name'] = 'prod' AND field['labels.region'] = 'us-east-1'

Lengthlength <= 1024
page_size?page_size

Maximum number of environments 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://example.com/v1/environments"
{  "environments": [    {      "id": "string",      "application_id": "string",      "name": "string",      "description": "string",      "labels": {        "property1": "string",        "property2": "string"      },      "created_by": {        "id": "string",        "display_name": "string",        "email": "string"      },      "created_at": "2023-01-15T01:30:15.01Z",      "updated_at": "2023-01-15T01:30:15.01Z",      "agents": [        {          "agent_id": "string",          "id": "string",          "kubernetes": {            "default_namespace": "string",            "create_namespaces": true,            "prune": true          }        }      ],      "approval": {        "required_approvals": 0,        "groups": [          {            "group_id": "string",            "approvals": 1          }        ]      },      "generation": "string",      "hold": {        "change_set_id": "string",        "held_at": "2023-01-15T01:30:15.01Z"      },      "last_apply": {        "change_set_id": "string",        "revision_id": "string",        "applied_at": "2023-01-15T01:30:15.01Z"      },      "infra_backend": {        "type": "string",        "config": {          "property1": null,          "property2": null        }      },      "infra_engine": {        "engine": "INFRA_ENGINE_UNSPECIFIED",        "version": "string"      },      "tracking": {        "kind": "KIND_UNSPECIFIED",        "pattern": "string"      }    }  ],  "next_page_token": "string"}