更新时间:2024-01-16 GMT+08:00
分享

查询共享存储目录

功能介绍

查询共享存储目录。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/{project_id}/persistent-storages/actions/list-share-folders

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

查询的偏移量。

limit

Integer

单次查询的大小[1-100]。

storage_id

String

WKS存储ID。

storage_claim_id

String

WKS存储目录声明ID。

path

String

查询名称需满足如下规则:

  1. 可见字符+空格。

  2. 长度0~128个字符。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

count

Integer

总数。

items

Array of SharePersistentStorageClaim objects

存储声明。

表5 SharePersistentStorageClaim

参数

参数类型

描述

storage_claim_id

String

WKS存储目录声明ID。

folder_path

String

存储对象路径。 注: path是对象在系统中的完整路径。 例如系统中存在如下目录结构的数据。 SFS-Tmp: └─shares ├─image └─video image的路径: shares/image/ video的路径: shares/video/

delimiter

String

路径分隔符。

claim_mode

String

存储声明的类型:

  • USER - 用户目录

  • SHARE - 共享目录

count

Map<String,Integer>

共享目录的关联用户、用户组数量。

状态码: 400

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 401

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 404

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 405

表10 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 503

表12 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

请求示例

GET /v1/a4da8115c9d8464ead3a38309130523f/actions/list-share-folders?limit=10&offset=0

响应示例

状态码: 200

成功响应。

{
  "count" : 1,
  "items" : [ {
    "storage_claim_id" : "a0890780-7ef2-4aaf-b56d-b25fb53b717e",
    "folder_path" : "shares/video/",
    "delimiter" : "/",
    "claim_mode" : "SHARE",
    "count" : {
      "USER" : 0,
      "USER_GROUP" : 1
    }
  } ]
}

状态码

状态码

描述

200

成功响应。

400

由于包含语法错误,当前请求无法被服务器理解。

401

鉴权失败。

403

没有操作权限。

404

找不到资源。

405

请求中指定的方法不被允许。

500

服务内部错误,具体返回错误码请参见错误码说明。

503

服务不可用。

错误码

请参见错误码

分享:

    相关文档

    相关产品