# 更新资源信息

# 调用方式: PUT

# 接口地址:

https://api.freelog.com/v2/resources/{resourceId}
1

# url传入参数说明:

参数 必选 类型及范围 说明
resourceId 必选 string 资源ID

# body传入参数说明:

参数 必选 类型及范围 说明
status 可选 int 资源状态1:上线 4:下线
intro 可选 string 资源简介信息
tags 可选 string[] 资源标签信息,自多20个
coverImages 可选 string[] 资源封面图,最多10张
addPolicies 可选 object[] 新增的策略对象集合
**policyName 必选 string 策略名称,标的物内部唯一
**policyText 必选 string 策略文本,encodeURIComponent编码
**status 可选 int 策略启用状态 1:上线 0:下线
updatePolicies 可选 object[] 更新的策略对象集合
** policyId 必选 string 策略ID
** status 必选 int 策略启用状态 1:上线 0:下线

# body示例

{
    "intro":"资源简介",
    "coverImages":[
        "https://image.freelog.com/preview/b042cd88-cc9a-43fb-b8fb-1cae320b7977.jpg"],
    "tags":["t1","t2"],
	"updatePolicies":[ { "policyId":"ec1de33e0d104e7c92f7e3d2e9741d3b","policyName":"new name3" } ] 
}
1
2
3
4
5
6
7

# 返回说明:

返回值字段 字段类型 字段说明
resourceId string 资源ID
resourceType string[] 资源类型[详见附表]
resourceName string 资源名称
userId int 用户ID
username string 用户姓名
coverImages string[] 封面图片
intro string 资源简介
tags string[] 资源标签集
latestVersion string 资源最大版本号
resourceVersions object[] 资源版本信息
** version string 资源版本号
** versionId string 资源版本Id
** createDate date 版本创建时间
policies object[] 资源授权策略
baseUpcastResources object[] 基础上抛信息
** resourceId string 上抛资源ID
** resourceName string 上抛资源名称

# 示例

{
    "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