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=="}
Copyright 北京红枣科技有限公司

results matching ""

    No results matching ""

    results matching ""

      No results matching ""