# 批量更新存储对象

# 调用方式: PUT

# 接口地址:

URL2:https://api.freelog.com/v2/storages/objects/updateBatch
1

# BODY传入参数说明:

参数 必选 类型及范围 说明
objectIds 必选 string[] 存储对象id集合
resourceTypeCode 必选 string 资源类型编号
resourceTypeName 可选 string 资源类型名称,填此项表示创建子类型

# 返回说明:

返回值字段 字段类型 字段说明
objectId string 存储对象ID
sha1 string 存储对象的sha1值
objectName string 对象名称
bucketId string 对象所在的bucketId
bucketName string 对象所在的bucket
resourceType string 对象类型
systemProperty object 对象的系统属性
customProperty object 对象的自定义属性

# 示例

返回值是key-value键值对,key是存储对象的id,status=1表示创建成功,status=2表示创建失败

{
  "ret": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "5f50b0e1f0c6814af84eaa3f": {
      "status": 1,
      "data": {
        "objectId": "5f50b0e1f0c6814af84eaa3f",
        "resourceType": "image",
        "sha1": "edf31f7f2d7814d45d08666c13524bc2de600cb1",
        "objectName": "2a",
        "bucketId": "5f50b0cdf0c6814af84eaa3e",
        "bucketName": "yuliang",
        "userId": 50021,
        "systemProperty": {
          "fileSize": 85199,
          "mime": "image/jpeg",
          "width": 1080,
          "height": 1920,
          "type": "jpg"
        },
        "customProperty": {
          "key1": "value1",
          "key2": "value2"
        },
        "dependencies": [
          {
            "name": "yuliang/my-resource-1",
            "type": "resource",
            "versionRange": "^1.0.0"
          },
          {
            "name": "yuliang/yuliang-a-1",
            "type": "object"
          }
        ],
        "createDate": "2020-09-03T09:01:21.264Z",
        "updateDate": "2020-09-07T07:45:01.888Z"
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43