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

limitintOptionalDefault 20

Number of items per page, maximum 100

pagestringOptionalDefault —

Omit on the first call; pass next_page from the previous response for subsequent calls

include_archivedboolOptionalDefault false

Whether 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 fields

dataarray<Environment>

Array of Environment objects

data[] Environment object fields

idstring

Environment ID, format: env_<ULID>

typestring

Fixed value environment

namestring

Environment name

descriptionstring

Environment description

scopestring

Scope. organization: visible to and reusable by all workspace members

configobject

Complete runtime configuration. Contains the following sub-fields:

config properties

typestring

cloud cloud container

packagesobject

Preinstalled dependencies grouped by package manager. Keys are apt / pip / npm; values are package name arrays

packages properties

aptarray<string>

Debian/Ubuntu package names

piparray<string>

Python package names

npmarray<string>

Node.js package names

networkingobject

Network policy object with the structure {"type": "unrestricted"}

networking properties

typestring

Currently only unrestricted

metadataobject

Custom business key-value pairs that do not affect runtime behavior

archived_atstring | null

Archive time; null when not archived

created_atstring

Creation time (ISO 8601)

updated_atstring

Last update time (ISO 8601)

next_pagestring / null

Cursor for the next page; absent or null when there is no more data

request_idstring

Unique identifier for this request

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: