# 分页获取测试资源列表
# 调用方式: GET
# 接口地址:
https://api.freelog.com/v2/testNodes/{nodeId}/testResources
1
# 传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
nodeId | 必选 | int | 节点ID |
skip | 可选 | int | 分页跳过的条数 |
limit | 可选 | int | 每页数量 |
resourceType | 可选 | string | 测试资源类型 |
onlineStatus | 可选 | int | 是否上线 0:否 1:是 2:全部 默认为1 |
tags | 可选 | string | 标签搜索,多个用逗号分隔 |
omitResourceType | 可选 | string | 忽略的资源类型,与resourceType参数互斥 |
keywords | 可选 | string | 搜索关键字,搜索测试资源名称或对应的主体名称 |
# 返回说明:
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
nodeId | int | 节点ID |
testResourceId | string | 测试资源ID |
testResourceName | string | 测试资源名称 |
resourceType | string | 资源类型 |
intro | string | 测试资源简介 |
originInfo | object | 资源源信息 |
** id | string | 测试资源引用的实体ID |
** name | string | 测试资源引用的实体名称 |
** type | string | 测试资源引用的实体类型 (object,resource) |
** version | string | 测试资源引用的实体版本 |
** versionRange | string | 测试资源引用的实体版本范围 |
** versions | string[] | 测试资源的所有版本 |
stateInfo | object | 相对于源实体的差异部分信息 |
**onlineStatusInfo | object | 上线状态信息 |
**** onlineStatus | int | 是否上线 1:上线 0:下线 |
**** ruleId | string | 设置上线状态的规则ID |
**tagInfo | object | 自定义标签信息 |
**** tags | string[] | 标签信息 |
**** ruleId | string | 设置标签的规则ID |
**titleInfo | object | 自定义标签信息 |
**** title | string[] | 标题 |
**** ruleId | string | 设置标签的规则ID |
**coverInfo | object | 自定义标签信息 |
**** coverImages | string[] | 封面图 |
**** ruleId | string | 设置标签的规则ID |
**propertyInfo | object | 自定义标签信息 |
**** testResourceProperty | object[] | 属性信息,包含key,value,remark |
****** key | string | 属性名称 |
****** value | string | 属性值 |
****** remark | string | 属性备注 |
****** isRuleAdd | boolean | 属性是否通过规则导入 |
****** authority | number | 属性权限 1:只读 2:可编辑 4:可删除 6:可删除可编辑 |
**** ruleId | string | 设置标签的规则ID |
**themeInfo | object | 自定义标签信息 |
**** isActivatedTheme | int | 是否是激活的主题 0:否 1:是 |
**** ruleId | string | 设置标签的规则ID,没有则为空 |
**replaceInfo | object | 自定义标签信息 |
**** rootResourceReplacer | object | 主资源替换者信息 |
**** replaceRecords | object[] | 替换记录 |
**** ruleId | string | 设置标签的规则ID |
rules | object | 当前测试资源生效的规则集 |
** id | string | 规则ID |
** operations | string[] | 规则对应的操作类型,包含add,alter,activate_theme,set_labels,online,replace,add_attr,delete_attr,set_cover,set_title |
resolveResourceSignStatus | int | 上抛签约状态 1:已全部签约 2:未全部签约 |
resolveResources | object[] | 测试节点需要解决的发行列表 |
**resourceId | string | 解决的资源ID |
**resourceName | string | 解决的资源名称 |
**contracts | object[] | 解决发行所用的合约 |
****policyId | string | 策略ID |
****contractId | string | 合约ID |
# 返回示例
{
"ret": 0,
"errCode": 0,
"errcode": 0,
"msg": "success",
"data": {
"skip": 0,
"limit": 3,
"totalItem": 7,
"dataList": [{
"associatedPresentableId": "6087b82c1ea940002e3c7a02",
"intro": "",
"resolveResourceSignStatus": 1,
"status": 0,
"nodeId": 80000014,
"userId": 50017,
"resourceType": "text",
"testResourceId": "1c25ecc60abacf9537732a916054bb06",
"testResourceName": "hello-world",
"originInfo": {
"version": "0.0.2",
"versionRange": "",
"versions": ["0.0.1", "0.0.2"],
"id": "5f3240c5f5d0dd002f2f060e",
"name": "yu/hello-world",
"type": "resource",
"resourceType": "text"
},
"stateInfo": {
"onlineStatusInfo": {
"ruleId": "default",
"onlineStatus": 0
},
"tagInfo": {
"tags": [],
"ruleId": "default"
},
"titleInfo": {
"title": "yu/hello-world",
"ruleId": "default"
},
"coverInfo": {
"coverImages": ["https://image.freelog.com/preview-image/e67dd09e1eba605887dc822cab102473b107f93a"],
"ruleId": "default"
},
"propertyInfo": {
"testResourceProperty": [{
"authority": 1,
"remark": "",
"key": "fileSize",
"value": 12
}, {
"authority": 1,
"remark": "文件类型",
"key": "mime",
"value": "text"
}, {
"authority": 6,
"remark": "0.0.1版本新增属性",
"key": "k001",
"value": "v001"
}],
"ruleId": "default"
},
"themeInfo": {
"isActivatedTheme": 0,
"ruleId": "default"
},
"replaceInfo": {
"rootResourceReplacer": {
"id": "5f3240c5f5d0dd002f2f060e",
"name": "yu/hello-world",
"type": "resource",
"versions": ["0.0.1", "0.0.2"],
"versionRange": "^0.0.1",
"resourceType": "text",
"version": "0.0.1",
"systemProperty": {
"fileSize": 12
},
"customPropertyDescriptors": [{
"candidateItems": [],
"remark": "文件类型",
"key": "mime",
"defaultValue": "text",
"type": "readonlyText"
}]
},
"replaceRecords": [{
"replaced": {
"id": "5f3240c5f5d0dd002f2f060e",
"name": "yu/hello-world",
"type": "resource",
"version": "0.0.2"
},
"replacer": {
"id": "5f3240c5f5d0dd002f2f060e",
"name": "yu/hello-world",
"type": "resource",
"version": "0.0.1"
}
}],
"ruleId": "82b52195f0044fc2727d7dedcbb78536"
}
},
"rules": [{
"ruleId": "82b52195f0044fc2727d7dedcbb78536",
"operations": ["alter", "replace"]
}],
"resolveResources": [],
"createDate": "2021-07-08T07:59:48.920Z",
"updateDate": "2021-07-08T07:59:48.920Z"
}, {
"associatedPresentableId": "6087ad22fd16a100346ad721",
"intro": "",
"resolveResourceSignStatus": 1,
"status": 0,
"nodeId": 80000014,
"userId": 50017,
"resourceType": "markdown",
"testResourceId": "462b7257893b089a01775735f926b58a",
"testResourceName": "设计规范文档",
"originInfo": {
"version": "0.1.3",
"versionRange": "",
"versions": ["0.1.0", "0.1.1", "0.1.2", "0.1.3"],
"id": "600926bdb71c95003921aa2a",
"name": "yanghongtian/设计规范文档",
"type": "resource",
"resourceType": "markdown"
},
"stateInfo": {
"onlineStatusInfo": {
"ruleId": "default",
"onlineStatus": 0
},
"tagInfo": {
"tags": [],
"ruleId": "default"
},
"titleInfo": {
"title": "设计规范文档",
"ruleId": "default"
},
"coverInfo": {
"coverImages": ["https://image.freelog.com/preview-image/253e6a7c42850fc2c8a624daa59ab1bab14ab923"],
"ruleId": "default"
},
"propertyInfo": {
"testResourceProperty": [{
"authority": 1,
"remark": "",
"key": "fileSize",
"value": 1319217
}, {
"authority": 1,
"remark": "",
"key": "mime",
"value": "image/png"
}, {
"authority": 1,
"remark": "",
"key": "111",
"value": "1"
}, {
"authority": 2,
"remark": "1",
"key": "1111",
"value": "1"
}],
"ruleId": "default"
},
"themeInfo": {
"isActivatedTheme": 0,
"ruleId": "default"
},
"replaceInfo": {
"rootResourceReplacer": null,
"replaceRecords": [],
"ruleId": "default"
}
},
"resolveResources": [{
"resourceId": "600926bdb71c95003921aa2a",
"contracts": [{
"contractId": "6087ad229e15fb002ece074f",
"policyId": "a97ebc9c26855e64b9121340867171fc"
}],
"resourceName": "yanghongtian/设计规范文档"
}],
"rules": [],
"createDate": "2021-07-08T07:59:49.026Z",
"updateDate": "2021-07-08T07:59:49.026Z"
}, {
"associatedPresentableId": "60866a40be60e8009191b9cf",
"intro": "",
"resolveResourceSignStatus": 1,
"status": 0,
"nodeId": 80000014,
"userId": 50017,
"resourceType": "theme",
"testResourceId": "3cc0f3ec6c99d987ec76de3f013a4313",
"testResourceName": "novel-theme",
"originInfo": {
"version": "0.1.1",
"versionRange": "",
"versions": ["0.1.0", "0.1.1", "0.1.2"],
"id": "60865bb6348128003490ae87",
"name": "Freelog/novel-theme",
"type": "resource",
"resourceType": "theme"
},
"stateInfo": {
"onlineStatusInfo": {
"ruleId": "default",
"onlineStatus": 0
},
"tagInfo": {
"tags": [],
"ruleId": "default"
},
"titleInfo": {
"title": "novel-theme",
"ruleId": "default"
},
"coverInfo": {
"coverImages": [],
"ruleId": "default"
},
"propertyInfo": {
"testResourceProperty": [{
"authority": 1,
"remark": "",
"key": "fileSize",
"value": 258372
}, {
"authority": 1,
"remark": "",
"key": "mime",
"value": "application/zip"
}],
"ruleId": "default"
},
"themeInfo": {
"isActivatedTheme": 0,
"ruleId": "default"
},
"replaceInfo": {
"rootResourceReplacer": null,
"replaceRecords": [],
"ruleId": "default"
}
},
"resolveResources": [{
"resourceId": "60865bb6348128003490ae87",
"contracts": [{
"contractId": "60866a409e15fb002ece074b",
"policyId": "e2ddfaa5787a3305c07acf7b3d20d1db"
}],
"resourceName": "Freelog/novel-theme"
}],
"rules": [],
"createDate": "2021-07-08T07:59:49.028Z",
"updateDate": "2021-07-08T07:59:49.028Z"
}]
}
}
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
← 批量修改展品授权排除项 创建节点测试规则 →