Skip to main content
Environment

Update Environment

Update environment configuration

POST
/api/v1/agentstudio/environments/{environment_id}
cURL
curl --request POST \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/environments/{environment_id}' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "data-sandbox",
  "description": "数据分析沙箱(更新)",
  "scope": "organization",
  "metadata": {
    "team": "infra"
  },
  "config": {
    "type": "cloud",
    "packages": {
      "apt": [
        "ffmpeg"
      ],
      "pip": [
        "pandas",
        "numpy",
        "scikit-learn"
      ]
    },
    "networking": {
      "type": "unrestricted"
    }
  }
}
'
{
  "id": "env_xxx",
  "type": "environment",
  "name": "data-sandbox",
  "description": "数据分析沙箱(更新)",
  "config": {
    "type": "cloud",
    "packages": {
      "apt": [
        "ffmpeg"
      ],
      "pip": [
        "pandas",
        "numpy",
        "scikit-learn"
      ]
    },
    "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:52:31+08:00",
  "request_id": "xxx"
}

Authorizations

string
header
required

DashScope API Key

Path Parameters

string
required

环境 ID

Body

application/json
string

工作空间内唯一标识

string

环境用途说明

enum<string>

作用域。organization:工作空间全部成员可见与复用

organization
object

沙箱配置

object

业务自定义键值,不影响运行行为。传入即整体替换原值,不做键级合并

Response

200-application/json
string

环境 ID

string

固定为 environment

string

环境名称

string

环境用途说明

string

作用域

object

更新后的完整运行时配置;未传入字段保留原值

object

业务自定义键值

string | null

归档时间,未归档时为 null

string

创建时间,ISO 8601

string

最近更新时间,ISO 8601

string

本次请求的唯一标识

Overview
Sandbox API
Memory API
Flow Agent API
RAG API
Connector API
Framework Integration
Assistant API (Deprecating)
  • Overview