# 批量更新资源信息
# 调用方式: PUT
# 接口地址:
https://api.freelog.com/v2/resources/updateBatch
1
# body传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
resourceIds | 必选 | int[] | 资源id集合 |
status | 可选 | int | 资源状态1:上线 4:下线 |
addPolicies | 可选 | object[] | 新增的策略对象集合 |
**policyName | 必选 | string | 策略名称,标的物内部唯一 |
**policyText | 必选 | string | 策略文本,encodeURIComponent编码 |
**status | 可选 | int | 策略启用状态 1:上线 0:下线 |
# 返回说明:
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
status | number | 更新的结果 1:成功 2:失败 |
data | object | 更新的资源信息 |
# 示例
返回值是key-value键值对,key是创建资源的资源id,status=1表示创建成功,status=2表示创建失败
{
"ret": 0,
"errcode": 0,
"msg": "success",
"data": {
"resourceId": "5ef04fb1bfe6f11cb0424e50",
"latestVersion": "",
"intro": "资源简介",
"coverImages": [
"https://image.freelog.com/preview/b042cd88-cc9a-43fb-b8fb-1cae320b7977.jpg"
],
"tags": [
"t1",
"t2"
],
"status": 0,
"resourceName": "yuliang/my-first-resource3",
"resourceType": "text",
"userId": 50021,
"username": "yuliang",
"policies": [],
"resourceVersions": [],
"baseUpcastResources": [],
"createDate": "2020-06-22T06:29:05.635Z",
"updateDate": "2020-06-22T06:29:05.635Z"
}
}
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
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