5.4.3.15 链码以及出块事件查询接口
用于查询已注册的链码以及出块事件监听列表。
1. 接口地址:https://节点网关地址/api/fabric/v1/chainCode/event/query
2. 通讯方式:POST
3. 签名算法:详见5.4.3.1应用接入签名算法
4. 请求参数
序号 | 字段名 | 字段 | 类型 | 必填 | 备注 |
---|---|---|---|---|---|
1 | 信息头 | header | Map | 是 | |
2 | 信息体 | body | Map | 否 | |
3 | 签名值 | mac | String | 是 | |
header | |||||
1 | 用户唯一标识 | userCode | String | 是 | |
2 | 应用唯一标识 | appCode | String | 是 |
示例
{"header":{"appCode":"CL20191107112252","userCode":"lessing"},"body":{},"mac":"MEQCIAnJxvuKVe0u/bG0VYCjM3g3ctxTYIWkejYp462okNlcAiBcOTGvAkF7xErL2w1PiwgfFjIu3Sszgyfzym/pEwRGxA=="}
5. 响应参数
序号 | 字段名 | 字段 | 类型 | 必填 | 备注 |
---|---|---|---|---|---|
1 | 信息头 | header | Map | 是 | |
2 | 信息体 | body | []body | 是 | 事件列表 |
3 | 签名值 | mac | String | 是 | |
header | |||||
1 | 响应标识 | code | int | 是 | 0:查询成功-1:查询失败 |
2 | 响应信息 | msg | String | 是 | |
body | |||||
1 | 事件编码 | eventId | String | 是 | |
2 | 链码事件key | eventKey | String | 否 | 块事件时为空 |
3 | 链码事件通知地址 | notifyUrl | String | 是 | |
4 | 附加参数 | attachArgs | String | 否 | |
5 | 创建时间 | createTime | String | 是 | |
6 | 城市编码 | orgCode | String | 是 | |
7 | 用户唯一标识 | userCode | String | 是 | |
8 | 应用唯一标识 | appCode | String | 是 | |
9 | 链码Code | chainCode | String | 否 | 块事件时为空 |
10 | 事件类型 | eventType | String | 否 | 块事件返回”block”,链码事件为空 |
示例
{ "header": { "code": 0, "msg": "查询链码事件成功" }, "body": [ { "eventKey": "test001", "notifyUrl": "http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs": "a=123\u0026b=456", "eventId": "945ee631d26140118963ad3104c81713", "createTime": "2019-11-18 14:22:59", "orgCode": "ORG1571365934172", "userCode": "lessing", "appCode": "CL20191107112252", "chainCode": "cc_bsn_test_00" }, { "eventKey": "test002", "notifyUrl": "http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs": "hahahhahhahahahah", "eventId": "346617a493d84c6d8512b8dddad87811", "createTime": "2019-11-18 14:29:28", "orgCode": "ORG1571365934172", "userCode": "lessing", "appCode": "CL20191107112252", "chainCode": "cc_bsn_test_00" }, { "eventKey": "test01", "notifyUrl": "http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs": "name=张三\u0026age=20", "eventId": "bd3391deedbe44a7ad5b7f80ce59abfa", "createTime": "2019-11-19 10:52:15", "orgCode": "ORG1571365934172", "userCode": "lessing", "appCode": "CL20191107112252", "chainCode": "cc_bsn_test_00" } ], "mac": "MEQCIEYXFMa8dfBrjy/s9H5JAoFIrjROJBiw+7/daELUbF5eAiA7a6HvqqbOpv6vlkunHGxCB1o5DoeuJFD0FM6kLoU34Q=="}