List Environments

Updated at:

Lists environments in the current workspace with pagination, sorted by created_at in descending order. Archived items are excluded by default.

Prerequisites

Endpoint and authentication are configured. See Overview and authentication.

Endpoint

GET /environments

Query parameters

ParameterRequiredTypeDefaultDescription
limitNoint20Number of items per page, maximum 100
pageNostring—Omit on the first call; pass next_page from the previous response for subsequent calls
include_archivedNoboolfalseWhether to include archived environments

Request example

curl "$AGENTSTUDIO_URL/environments?limit=20" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
for env in client.environments.list(include_archived=False, limit=20):
    print(env.id, env.name)
CursorPage<Environment> page = client.environments().list(EnvironmentListParam.builder()
    .includeArchived(false)
    .limit(20)
    .build());
for (Environment e : page.getData()) System.out.println(e.getId() + " " + e.getName());

Response example

{
  "data": [
    {
      "id": "env_xxx",
      "type": "environment",
      "name": "data-sandbox",
      "description": "Data analysis sandbox",
      "config": {
        "type": "cloud",
        "packages": {"apt": ["ffmpeg"], "pip": ["pandas", "numpy", "matplotlib"]},
        "networking": {"type": "unrestricted"}
      },
      "metadata": {"team": "infra"},
      "scope": "organization",
      "archived_at": null,
      "created_at": "2026-06-16T12:45:34+08:00",
      "updated_at": "2026-06-16T12:45:34+08:00"
    }
  ],
  "next_page": "xxx",
  "request_id": "xxx"
}

The top level of the response contains data (an array of Environment objects), next_page (cursor for the next page), and request_id (unique identifier for this request). Environment object fields are as follows:

Environment object fields

FieldTypeDescription
idstringEnvironment ID, format: env_&lt;ULID&gt;
typestringFixed value environment
name / description / scope / config / metadatastring / objectBasic environment attributes and full runtime configuration (sandbox type, pre-installed dependencies, networking policy)
archived_atstring | nullArchive time; null when not archived
created_at / updated_atstringCreation / last update time, ISO 8601