# 获取展品授权信息
# 调用方式: GET
# 接口地址:
正式环境:
url1: https://api.freelog.com/v2/auths/exhibits/{nodeId}/{exhibitId}/{result|info|fileStream}
url2: https://api.freelog.com/v2/auths/exhibits/{nodeId}/articles/{articleIdOrName}/{result|info|fileStream}
测试节点环境:
url1: https://api.freelog.com/v2/auths/exhibits/{nodeId}/test/{exhibitId}/{result|info|fileStream}
url2: https://api.freelog.com/v2/auths/exhibits/{nodeId}/test/articles/{articleIdOrName}/{result|info|fileStream}
1
2
3
4
5
6
2
3
4
5
6
# url1传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
exhibitId | 必选 | string | 展品Id |
parentNid | 可选 | string | 依赖树上的父级节点ID,一般获取展品子依赖需要传递 |
subArticleIdOrName | 可选 | string | 子依赖的作品ID作品名称 |
subArticleType | 可选 | string | 子依赖的作品类型 (1:独立资源 2:组合资源 3:节点组合资源 4:存储对象) |
subFilePath | 可选 | string | 主题或插件的压缩包内部子资源,需要带相对路径 |
# url2传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
nodeId | 必选 | int | 节点ID |
articleIdOrName | 必选 | string | 作品ID或者名称,需要encodeURIComponent编码 |
parentNid | 可选 | string | 依赖树上的父级节点ID,一般获取展品子依赖需要传递 |
subArticleIdOrName | 可选 | string | 子依赖的作品ID作品名称 |
subArticleType | 可选 | string | 子依赖的作品类型 (1:独立资源 2:组合资源 3:节点组合资源 4:存储对象) |
subFilePath | 可选 | string | 主题或插件的压缩包内部子资源,需要带相对路径 |
# 返回说明: 公共http-header返回说明:
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
freelog-exhibit-id | string | 展品ID |
freelog-exhibit-name | string | 展品名称 |
freelog-exhibit-property | string | 展品属性 |
freelog-article-nid | string | 响应的作品在展品依赖树上的节点ID |
freelog-article-sub-dependencies | string | 响应的作品的子依赖(包含id,nid,name,type,resourceType) |
** id | string | 当前请求的作品ID |
** nid | string | 当前请求的作品在依赖树中的依赖ID |
** name | string | 当前请求的作品名称 |
** type | int | 当前请求的作品类型(1:独立资源 2:组合资源 3:节点组合资源 4:存储对象) |
** resourceType | string[] | 当前请求的作品对应的资源类型 |
freelog-article-resource-type | string | 响应的作品资源类型 |
# response-type: result (标准授权响应结果)
当授权不通过时,会响应402 http状态码
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
exhibitId | string | 展品ID |
exhibitName | string | 展品名称 |
referee | int | 做出授权结果的标的物服务类型(1:资源服务 2:展品服务) |
defaulterIdentityType | int | 授权不通过责任方(0:无 1:资源 2:节点 4:c端消费者 128:未知) |
authCode | int | 授权码 |
isAuth | boolean | 是否授权通过 |
errorMsg | string | 错误信息 |
# response-type: result 响应示例
{
"ret": 0,
"errCode": 0,
"errcode": 0,
"msg": "success",
"data": {
"exhibitId": "619dee91fec334002ed6168c",
"exhibitName": "contract002",
"authCode": 303,
"isAuth": false,
"errorMsg": "",
"referee": 2,
"defaulterIdentityType": 4
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# response-type: info (展品信息)
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
exhibitId | string | 展品ID |
exhibitName | string | 展品名称 |
exhibitTitle | string | 展品标题 |
tags | string[] | 展品标签 |
intro | string | 展品简介 |
coverImages | string[] | 展品封面图 |
version | string | 展品版本 |
onlineStatus | int | 上线状态 0:下线 1:上线 |
userId | int | 展品的创建者ID |
nodeId | int | 展品所属节点ID |
policies | object[] | 对外授权的策略组 |
** policyId | string | 策略ID |
** policyName | string | 策略名称 |
** status | int | 策略状态 0:下线(未启用) 1:上线(启用) |
** policyText | string | 策略文本 |
articleInfo | object | 展品实际挂载的作品信息 |
** articleId | string | 作品ID |
** articleName | string | 作品名称 |
** resourceType | string | 作品资源类型 |
** articleType | int | 作品类型 (1:独立资源 2:组合资源 3:节点组合资源 4:存储对象) |
** articleOwnerId | int | 作品所有者ID |
** articleOwnerName | string | 作品所有者名称 |
createDate | date | 创建日期 |
updateDate | date | 更新日期 |
# response-type: info 响应示例
{
"ret": 0,
"errCode": 0,
"errcode": 0,
"msg": "success",
"data": {
"exhibitId": "608667da52abf900867dfd48",
"exhibitName": "novel-theme",
"exhibitTitle": "novel-theme",
"exhibitSubjectType": 2,
"tags": [],
"intro": "展品产品侧未提供简介字段",
"coverImages": [],
"version": "0.1.3",
"policies": [{
"policyId": "3104b19e139f132b9407c9b89c32f637",
"policyName": "免费策略",
"status": 1,
"translateInfo": {
"audienceInfos": [],
"fsmInfos": [{
"stateInfo": {
"origin": "initial",
"content": "初始状态"
},
"serviceStateInfos": [{
"origin": "active",
"content": "已授权"
}],
"eventTranslateInfos": []
}],
"content": "\n初始状态[已授权]:\n\t\n"
},
"policyText": "for public initial[active]:\n terminate",
"fsmDescriptionInfo": {
"initial": {
"serviceStates": ["active"],
"isInitial": true,
"isAuth": true,
"isTestAuth": false,
"isTerminate": true,
"transitions": []
}
}
}],
"onlineStatus": 1,
"nodeId": 80000012,
"userId": 50031,
"articleInfo": {
"articleId": "60865bb6348128003490ae87",
"articleName": "Freelog/novel-theme",
"resourceType": "theme",
"articleType": 1,
"articleOwnerId": 0,
"articleOwnerName": "Freelog"
},
"status": 0
}
}
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
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
# response-type: fileStream (文件流)
标准 fileStream 文件流
← 查询展品详细信息 批量获取展品授权结果 →