DELETE /api/v1/cloud/environments/{environment_id}
删除 Environment 并返回删除确认。如果该 Environment 仍被 Session 或 tool call 引用,API 会返回 409,此时应改为归档该 Environment。
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer <PAT> |
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
environment_id | string | 是 | 环境的唯一标识(前缀为 env_) |
示例请求
示例响应
HTTP 200 OK"type": "environment_deleted" 标识。
错误码
| HTTP | type | 说明 |
|---|---|---|
| 401 | authentication_error | 认证失败,PAT 无效或过期 |
| 403 | permission_error | 无权访问此资源 |
| 404 | not_found_error | 指定 ID 的环境不存在 |
| 409 | invalid_request_error | Environment 仍被 Session 或 tool call 引用 |
相关
云端环境
选择 Agent 运行的容器、网络与依赖。