查看沙盒资源用量 | 大装置帮助中心
跳到主要内容

查看沙盒资源用量

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

请求头(Request Header)

请参考API 使用指南

请求参数(Request Parameters)

名称类型必须位置描述
workspace_idstringpath工作空间 ID
granularitystringquery时间粒度:DAY
start_timeintegerquery开始时间戳(Unix 秒)
end_timeintegerquery结束时间戳(Unix 秒)

请求示例(Request Example)


curl -L -X GET 'https://sandbox.cn-sh-01.sensecoreapi.tech/studio/sandbox/v1/workspaces/01995733-e3da-7635-99ae-f1acf14364c4/usage?start_time=1762940627&end_time=1763027027\
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

响应(Response)

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

字段类型描述
usage_itemsarray用量列表

其中,usage_items每个元素包含参数如下:

字段类型描述
start_timeinteger时间段起始时间戳
usageobject用量详情

其中,usage包含参数如下:

字段类型描述
cpu_usageintegerCPU 用量(核*分钟)
memory_usageinteger内存用量(GB*分钟)
storage_usageinteger存储用量(GB*分钟)

响应示例(Response Example)

  • 正常响应

{
"usage_items": [
{
"start_time": "1762905600",
"usage": {
"cpu_usage": 86421,
"memory_usage": 86421,
"storage_usage": 86421
}
},
{
"start_time": "1762992000",
"usage": {
"cpu_usage": 59639,
"memory_usage": 59639,
"storage_usage": 59639
}
}
]
}