Skip to content

获取空间使用量

适用版本>=v7.0.2412a.20241212

接口说明:获取空间使用量

请求说明

请求地址配置域名+/openapi+/v7/space/statistics
请求方法GET
签名方式KSO-1(配置域名+/openapi不参与签名)
权限要求查询和管理空间配额(应用授权) kso.space_quota.readwrite

请求头(Header)

Header参数类型是否必填说明
X-Kso-DatestringRFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT
X-Kso-AuthorizationstringKSO-1 签名值,详见《签名方法》
Authorizationstring授权凭证,格式为:Bearer {access_token}

查询参数(Query)

名称参数类型是否必填说明
allocate_typestring配额主体的类型,user: 用户;doclib: 云文档团队;dept:部门
allocate_to_liststring[]配额主体唯一标识,若传该值则scope_type、scope_id传参失效
limitint64分页大小
offsetint64分页偏移
scope_typestring查询范围类型,不传则默认查询根部门。可选值:dept: 部门
scope_idstring查询范围id,若scope_type已传值,则该值必传。scope_typedept时,scope_id为部门Id
with_file_partsboolean是否获取文档类型组成分配

响应体(Response)

名称类型说明
codeint错误码
detailstring详细信息
msgstring状态信息
dataobject返回信息体
itemsobject[]
allocate_tostring配额主体唯一标识
allocate_typestring配额主体类型
file_partsobject[]文档组成部分
typestring组成部分,document:文档;image:图片;audiovisual:音视频;other:其它;
usedstring已使用大小;单位字节
usedstring已使用大小;单位字节
totalstring总数

响应体示例

json
{
  "data": {
    "items": [
      {
        "allocate_to": "string",
        "allocate_type": "user",
        "file_parts": [
          {
            "type": "document",
            "used": 0
          }
        ],
        "used": 0
      }
    ],
    "total": 0
  },
  "code": 0,
  "detail": "string",
  "msg": "string"
}