Skip to main content

Retrieve Environment

Returns the full configuration of an environment by ID, including sandbox type, pre-installed dependencies, and networking policy.

Prerequisites

Endpoint and authentication are configured. See Overview and authentication.

Endpoint

GET /environments/{environment_id}

Request example

curl "$AGENTSTUDIO_URL/environments/env_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "id": "env_xxx",
  "type": "environment",
  "name": "data-sandbox",
  "description": "数据分析沙箱",
  "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",
  "request_id": "xxx"
}
The response is an Environment object. Fields are as follows:

Response fields

FieldTypeDescription
idstringEnvironment ID, format: env_<ULID>
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
request_idstringUnique identifier for this request
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration