查看某一目录下的文件list | 大装置帮助中心
跳到主要内容

查看某一目录下的文件list

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

请求头(Request Header)

请参考API 使用指南

请求参数(Request Parameters)

名称类型必须位置描述
workspace_idstringpath工作空间 ID
sandbox_idstringpath沙盒 ID
directory_pathstringquery目录路径(默认根目录)

请求示例(Request Example)


curl -L -X GET 'https://sandbox.cn-sh-01.sensecoreapi.tech/studio/sandbox/v1/workspaces/01995733-e3da-7635-99ae-f1acf14364c4/sandboxes/cd9b9ea5-0566-40c4-9c5c-8498d7093a44:listFiles?directory_path=%2Fdata \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

响应(Response)

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

字段类型描述
filesarray[object]文件/目录列表

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

字段类型描述
namestring名称
sizedouble大小(字节)
is_directorybool是否为目录
create_timestring创建时间
update_timestring更新时间

响应示例(Response Example)

  • 正常响应

{
"files": [
{
"name": "/data/test/"
}
]
}