查询沙盒组列表 | 大装置帮助中心
跳到主要内容

查询沙盒组列表

GET https://sandbox.cn-sh-01.sensecoreapi.cn/studio/sandbox/v1/workspaces/{workspace_id}/sandboxGroups

请求头(Request Header)

请参考API 使用指南

请求参数(Request Parameters)

名称类型必须位置描述
workspace_idstringpath工作空间id,获取方式可以参考快速开始
filterstringquery过滤条件
order_bystringquery排序,例:"create_time desc, name".
page_sizeintegerquery返回当前页的最大条目数.
page_tokenstringquery从上一个List请求返回的next_page_token值(如果有的话).

请求示例(Request Example)

curl -L -X GET 'https://sandbox.cn-sh-01.sensecoreapi.cn/studio/sandbox/v1/workspaces/01993ca4-edfa-7382-8161-43a4919681ab/sandboxGroups' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

响应(Response)

异常情况请参考异常响应说明

名称类型描述
sandbox_groupsarray[object]已有的沙盒组列表
next_page_tokenstring下一页的token.
total_sizeinteger沙盒组资源总数.

其中,sandbox_groups中每个元素参数如下:

字段类型描述
workspace_idstring工作空间ID
idstring沙盒组 ID
namestring沙盒组名称
descriptionstring沙盒组描述
snapshotobject快照信息
statestring沙盒实例创建进度: STATE_UPDATING(创建中), STATE_READY(创建结束)
volumesarray[object]挂载的存储,若未挂载存储,则不返回该字段
environmentobject环境变量(键值对),若未设置环境变量,则不返回该字段
creatorstring创建者
updatorstring更新者
total_instance_countinteger沙盒组预期实例数量
running_instance_countinteger正常运行中的实例数量
create_timestring创建时间
update_timestring更新时间
auto_delete_afterinteger自动删除时长,单位为秒,即从沙盒创建,存活设定时长后系统自动删除该沙盒。若为不自动删除,则不返回该字段
auto_delete_atstring自动删除时间戳,若为不自动删除,则不返回该字段

其中,snapshot的参数如下:

名称类型描述
workspace_idstring工作空间ID
idstring快照ID
namestring快照名称
descriptionstring快照描述,若为空,则不返回该字段
imageobject快照所用镜像信息
resource_limitsobject资源规格设置
commandstring启动命令

其中,image的参数如下:

名称类型描述
idstring镜像ID
namestring镜像名称
typestring镜像类型, IMAGE_TYPE_BUILT_IN为预置镜像
descriptionstring镜像描述,若为空,则不返回该字段
repositorystring镜像仓库地址
create_timestring镜像创建时间
update_timestring镜像更新时间

其中,resource_limits的参数如下:

名称类型描述
cpuintegercpu核数,最小为1核
memoryinteger内存规格,单位GiB,最小为1GiB
storageinteger存储规格,单位GiB,最小为1GiB

其中,volumes每个元素参数如下:

名称类型描述
typestring卷类型,值可能为 VOLUME_TYPE_AFS(挂载文件存储), VOLUME_TYPE_AOSS(挂载对象存储)
afsobjectafs文件存储卷信息,当type为VOLUME_TYPE_AFS时不为空
aossobjectaoss存储桶信息,当type为VOLUME_TYPE_AOSS时不为空

其中,afs每个元素参数如下:

名称类型描述
volume_idstring卷ID
source_pathstringNFS 源路径(主机端路径)
target_pathstring容器内挂载路径(目标路径)

其中,aoss每个元素参数如下:

名称类型描述
bucketstring存储桶名称
endpointstring桶的Endpoint
access_keystring密钥ID
target_pathstring沙盒内挂载路径
mount_optionsstring挂载高级配置参数,若为空,则不返回该字段

响应示例(Response Example)

  • 正常响应
{
"sandbox_groups": [
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "c9111309-2537-44e7-ad33-0fcb63755222",
"name": "test111",
"description": "www",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "abb5331c-157b-42f1-928b-9d58a3271e5e",
"name": "4523",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 1,
"memory": 3,
"storage": 4
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-10-10T02:53:27.711061Z",
"update_time": "2025-10-10T02:53:27.711061Z"
},
"state": "STATE_READY",
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 1,
"create_time": "2025-10-13T07:52:19.301472Z",
"update_time": "2025-10-13T08:04:45.314169Z",
"auto_delete_at": "2025-10-13T08:09:45.315634Z",
"running_instance_count": 1
},
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "5837aaee-c1c6-4293-beec-3b888a004caa",
"name": "233",
"description": "112",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "abb5331c-157b-42f1-928b-9d58a3271e5e",
"name": "4523",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 1,
"memory": 3,
"storage": 4
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-10-10T02:53:27.711061Z",
"update_time": "2025-10-10T02:53:27.711061Z"
},
"state": "STATE_READY",
"environment": {
"sdfdsgdg": "232312"
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 1,
"create_time": "2025-10-13T07:51:32.415639Z",
"update_time": "2025-10-13T07:51:35.746015Z",
"running_instance_count": 1
},
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "aa60f65e-ea66-4100-86b7-efb2fb77d9d3",
"name": "lzmtest",
"description": "test",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "5e3de167-9206-4fae-85e9-8456c8912877",
"name": "lzm_test_1",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 1,
"memory": 1,
"storage": 1
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-09-12T06:38:01.099985Z",
"update_time": "2025-09-12T06:38:01.099985Z"
},
"state": "STATE_READY",
"environment": {
"pythonenv1": "test"
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 2,
"create_time": "2025-10-13T07:38:05.759991Z",
"update_time": "2025-10-13T07:39:53.677478Z",
"auto_delete_at": "2025-10-13T12:39:53.678893Z"
},
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "bac38990-88e7-408a-8072-3460c28d882e",
"name": "test3333",
"description": "3444",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "abb5331c-157b-42f1-928b-9d58a3271e5e",
"name": "4523",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 1,
"memory": 3,
"storage": 4
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-10-10T02:53:27.711061Z",
"update_time": "2025-10-10T02:53:27.711061Z"
},
"state": "STATE_READY",
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 1,
"create_time": "2025-10-13T03:25:18.141177Z",
"update_time": "2025-10-13T07:12:34.352733Z",
"auto_delete_at": "2025-10-14T03:45:34.354009Z",
"running_instance_count": 1
},
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "535ea435-57ab-49aa-be2d-9092fa23448c",
"name": "12",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "2665cba7-4791-47be-96e6-98c53092b47e",
"name": "22222222222222222222222222222222222222222222223fdfgdgfgfgfgggggg",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 3,
"memory": 4,
"storage": 3
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-09-29T08:00:39.454426Z",
"update_time": "2025-09-29T08:00:39.454426Z"
},
"state": "STATE_READY",
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 1,
"create_time": "2025-10-13T03:12:17.034703Z",
"update_time": "2025-10-13T03:12:22.399791Z",
"auto_delete_at": "2025-10-14T03:12:22.399679Z",
"running_instance_count": 1
},
{
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "0cdf436b-9665-4321-801c-da848c4bc325",
"name": "122",
"description": "23",
"snapshot": {
"workspace_id": "01993ca4-edfa-7382-8161-43a4919681ab",
"id": "3a843cf4-ffbc-4003-945c-53a425d5c974",
"name": "234",
"image": {
"id": "built_in_image_1",
"name": "vemlp-cn-beijing.cr.volces.com/preset-images/code-sandbox:server-20250609",
"type": "IMAGE_TYPE_BUILT_IN",
"create_time": "2025-09-12T06:24:36.918629Z",
"update_time": "2025-09-12T06:24:36.918629Z"
},
"resource_limits": {
"cpu": 2,
"memory": 1,
"storage": 3
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"create_time": "2025-09-29T07:29:14.494602Z",
"update_time": "2025-09-29T07:29:14.494602Z"
},
"state": "STATE_READY",
"environment": {
"fadsa": "12"
},
"creator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"updator": "f97e5bc3-fbc4-4b9a-8d4b-7207bd4e3e1e",
"total_instance_count": 1,
"create_time": "2025-10-09T02:45:55.334259Z",
"update_time": "2025-10-10T03:25:41.089025Z",
"auto_delete_at": "2047-12-11T02:28:19.023860Z"
}
],
"total_size": 6
}