Projects
List environments
Scope: env:read
Authorization
bearerAuth An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...
In: header
Path Parameters
The project id.
Query Parameters
Maximum number of environments to return per page. Defaults to 50 when omitted or 0; must not exceed 100.
int320 <= value <= 100Opaque pagination token from a previous response.
An AIP-160 filter expression. Filterable fields are resource_name,
name, display_name, description and labels.<key>.
resource_name takes the full resource name, with - for the project,
and name the short name.
Example: labels.region = "us-east-1" AND name = "prod", or
resource_name = "projects/-/environments/prod"
id is filterable too: id = "a" OR id = "b" reads up to 100 of
them by id in one call.
length <= 4096Fields to order by, in AIP-132 syntax such as created_at desc. Accepted
fields: created_at, name and updated_at. Left empty, the list keeps the order stated above. An
unknown field is INVALID_ARGUMENT.
length <= 256Response Body
application/json
curl -X GET "https://example.com/v1/projects/string/environments"{ "environments": [ { "id": "string", "name": "string", "display_name": "string", "resource_name": "string", "description": "string", "project_id": "string", "labels": { "property1": "string", "property2": "string" }, "agents": [ { "agent_id": "string", "id": "string", "kind": "AGENT_KIND_UNSPECIFIED", "settings": { "infra": { "backend": { "type": "string", "config": { "property1": null, "property2": null } }, "engine": { "engine": "ENGINE_UNSPECIFIED", "version": "string" } } } } ], "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", "run_id": "string" }, "last_apply": { "change_set_id": "string", "revision_id": "string", "applied_at": "2023-01-15T01:30:15.01Z", "run_id": "string" }, "etag": "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" } ], "next_page_token": "string"}List live components in one environment or across all GET
Scope: `env:read`
Rename an environment POST
A Terraform workspace on Admiral's hosted state is named `<project>_<environment>_<component>`, so a `cloud` block that names the old name stops resolving too. Name the workspace `<environment id>_<component>`, such as `env-01je3n6r1k8w_web`, to keep it working across renames. - ALREADY_EXISTS when another environment in the project has the new name. - ABORTED when `etag` is set and the environment changed since it was read. Scope: `env:write`