# 更新资源版本信息
# 调用方式: PUT
# 接口地址:
https://api.freelog.com/v2/resources/{resourceId}/versions/{version}
1
# url传入参数说明
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
version | 必选 | string | 版本号 |
resourceId | 必选 | string | 资源ID |
# body传入参数说明
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
description | 可选 | string | 版本描述信息 |
customPropertyDescriptors | 可选 | object[] | 版本自定义属性定义,此处需要全局传入 |
** key | 必选 | string | 自定义属性名称 |
** defaultValue | 必选 | string | 自定义属性对应的值 |
** type | 必选 | string | 属性类型(editableText:可编辑文本,readonlyText:只读文本,radio:单选,checkbox:多选,select:下拉选项) |
** candidateItems | 可选 | string[] | 选项列表,单选,多选,下拉选择时需要提供选项 |
** remark | 可选 | string | 字段说明 |
batchSignContracts | 可选 | object[] | 如果需要在更新版本时签约,则需要传递此参数 |
** resourceId | 必选 | string | 解决的资源ID |
** policyIds | 必选 | string[] | 策略ID |
inputAttrs | 可选 | object[] | 输入属性数组 {key:string,value:any} |
# body示例
{
"description":"版本描述",
"customPropertyDescriptors":[{"key":"name","defaultValue":"1","type":"editableText","remark":"名称-可编辑文本框"}]
}
1
2
3
4
5
2
3
4
5
# 返回说明:
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
resourceId | string | 资源ID |
resourceType | string | 资源类型[[详见附表]][资源类型] |
resourceName | string | 资源名称 |
userId | int | 用户ID |
description | string | 资源描述信息 |
version | string | 版本号 |
versionId | string | 版本ID |
fileSha1 | string | 资源sha1值 |
dependencies | object[] | 资源依赖信息 |
**resourceId | string | 依赖的资源ID |
**resourceName | string | 依赖的资源名称 |
**versionRange | string | 依赖的资源版本范围 |
upcastResources | object[] | 真实上抛资源列表,资源的基础上抛子集 |
** resourceId | string | 上抛资源ID |
** resourceName | string | 上抛资源名称 |
systemProperty | object | 系统属性 |
customProperty | object | 自定义系统属性(根据描述器自动生成的) |
customPropertyDescriptors | object[] | 自定义属性描述器 |
** key | string | 自定义属性名称 |
** defaultValue | string | 自定义属性对应的值 |
** type | string | 属性类型(editableText:可编辑文本,readonlyText:只读文本,radio:单选,checkbox:多选,select:下拉选项) |
** candidateItems | string[] | 选项列表,单选,多选,下拉选择时需要提供选项 |
createDate | date | 创建日期 |
# 示例
{
"ret":0,
"errcode":0,
"msg":"success",
"data":{
"description":"版本描述",
"status":1,
"versionId":"51efb8c3e8b18e7c7ecc6b2d646b6cc8",
"version":"1.0.0",
"resourceId":"5ef04fb1bfe6f11cb0424e50",
"resourceName":"yuliang/my-first-resource3",
"userId":50021,
"resourceType":"text",
"fileSha1":"4a10ed3b6e45f8014b8240ad37f44cfc9c75e754",
"dependencies":[
],
"resolveResources":[
],
"upcastResources":[
],
"systemProperty":{
"fileSize":338
},
"customPropertyDescriptors":[
{
"candidateItems":[
],
"remark":"名称-可编辑文本框",
"key":"name",
"defaultValue":"1",
"type":"editableText"
}],
"createDate":"2020-06-22T06:46:40.010Z",
"updateDate":"2020-06-22T06:46:40.010Z",
"customProperty":{
"name":"1"
}
}
}
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
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
← 根据sha1查询资源列表 保存资源版本草稿 →