百度区块链引擎BBE

    查看通知列表

    查看通知列表

    接口描述:查看发送给用户的所有组织的事件通知

    权限说明:请求发起人需要具有合法的AccessKeyID和SecretAccessKey才能发起请求。

    注意事项:如果请求中没有用户验证信息(即匿名访问),返回403 Forbidden,错误信息:AccessDenied

    请求(Request)

    • 请求语法

      GET /v1/fabric/consortiums/events/list?tag={tag}&state={state} HTTP/1.1
      Host: bbe.bj.baidubce.com
      x-bce-date: <x-bce-date>
      x-bce-request-id: <x-bce-request-id>
      Authorization: <Authorization>
    • 请求头域:除公共头域外,无其它特殊头域。
    • 请求参数

      名称 类型 位置 描述 是否必须
      tag int Query参数 事件类型(1 联盟,2 channel,3 chaincode) 必须
      state int Query参数 通知状态(0 未读, 1 已读) 必须
      consortiumName String Query参数 联盟名 可选
      channelName String Query参数 通道名 可选

    响应(Response)

    • 响应头域:除公共头域外,无其它特殊头域。
    • 响应参数
    名称 类型 描述
    Events [ ]Event 事件通知列表,结构具体定义见附录说明

    失败响应参考错误码部分。

    示例

    • 请求示例

      GET /v1/fabric/consortiums/events/list?tag=2&state=0 HTTP/1.1
      Host: bbe.bj.baidubce.com
      x-bce-date: 2019-10-29T08:50:23Z
      Authorization: bce-auth-v1/e38d78f7b74841ec92727531369834d8/2019-10-29T08:50:23Z/1800/host/6fafe75cbcc9424e7d176a1ad8bcc94be081749ac8c3809f069f6a23ae290499
    • 响应示例

      200
      Content-Length: 3153
      Content-Type: application/json; charset=utf-8
      Date: Fri, 04 Jan 2019 07:24:02 GMT
      
      {
          "data": {
              "events": [
                  {
                      "uuid": "c324986a-e305-4f21-bd40-18c2f65a1643-agree-approval-0",
                      "fromUuid": "edaefb5b-3344-4321-88b0-bc38ecb3764e",
                      "fromName": "fab-con-573-auto-test",
                      "toUuid": "bc197ef9-0c47-403a-829a-d537c7ee1fa4",
                      "consortiumName": "fab-con-573-auto-test",
                      "channelName": "cha-jw2",
                      "tag": 2,
                      "state": 0,
                      "message": "亲爱的审批者,通道创建审批成功",
                      "createTime": "2019-10-29T16:31:16+08:00"
                  },
                  {
                      "uuid": "89fa78c0-fedc-ecc9-b30e-9ae72060b8c1-event-0",
                      "fromUuid": "edaefb5b-3344-4321-88b0-bc38ecb3764e",
                      "fromName": "fab-org2-195-auto-test",
                      "toUuid": "bc197ef9-0c47-403a-829a-d537c7ee1fa4",
                      "consortiumName": "fab-con-573-auto-test",
                      "channelName": "cha-jw2",
                      "tag": 2,
                      "state": 0,
                      "message": "组织fab-org2-195-auto-test申请创建通道cha-jw2",
                      "createTime": "2019-10-29T10:36:17+08:00"
                  },
                  {
                      "uuid": "9124e692-8c58-4de4-9a64-d9aa80b6b7c1-agree-appproval-0",
                      "fromUuid": "6580c04b-fd52-4905-ba0a-467b260f4fa1",
                      "fromName": "fab-con-742-auto-test",
                      "toUuid": "bb696d38-8594-44da-aad9-6ea0fb37d56d",
                      "consortiumName": "fab-con-742-auto-test",
                      "channelName": "fab-cha-304-auto-test",
                      "tag": 2,
                      "state": 0,
                      "message": "组织6580c04b-fd52-4905-ba0a-467b260f4fa1加入通道",
                      "createTime": "2019-10-28T20:20:17+08:00"
                  },
                  {
                      "uuid": "e0f809e5-64a1-4435-85f7-5b28b37040b9-event-0",
                      "fromUuid": "6580c04b-fd52-4905-ba0a-467b260f4fa1",
                      "fromName": "fab-org2-738-auto-test",
                      "toUuid": "bb696d38-8594-44da-aad9-6ea0fb37d56d",
                      "consortiumName": "fab-con-742-auto-test",
                      "channelName": "fab-cha-304-auto-test",
                      "tag": 2,
                      "state": 0,
                      "message": "组织fab-org1-880-auto-test申请加入通道fab-cha-304-auto-test",
                      "createTime": "2019-10-28T20:20:16+08:00"
                  },
                  {
                      "uuid": "28a2d1c7-9d6d-490a-a8d4-f2912b1b4a43-agree-sender-15",
                      "fromUuid": "6580c04b-fd52-4905-ba0a-467b260f4fa1",
                      "fromName": "fab-con-742-auto-test",
                      "toUuid": "bb696d38-8594-44da-aad9-6ea0fb37d56d",
                      "consortiumName": "fab-con-742-auto-test",
                      "channelName": "fab-cha-304-auto-test",
                      "tag": 2,
                      "state": 0,
                      "message": "亲爱的用户,通道创建审批成功",
                      "createTime": "2019-10-28T20:20:02+08:00"
                  }
              ]
          }
      }
    上一篇
    通过审批
    下一篇
    查看审批列表