百度区块链引擎BBE

    查询channel下Chaincode列表

    查询channel下Chaincode列表

    接口描述

    查询某个channel下所有chaincode详细信息。

    权限说明

    请求发起人需要具有合法的AccessKeyID和SecretAccessKey才能发起请求。

    注意事项

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

    请求(Request)

    • 请求语法
    GET /v1/fabric/chaincode/channel/:channelUuid HTTP/1.1
    Host: bbe.bj.baidubce.com
    x-bce-date: <x-bce-date>
    x-bce-request-id: <x-bce-request-id>
    Authorization: <Authorization>
    • 请求头域

      除公共头域外,无其它特殊头域。

    • 请求参数
    名称 类型 描述 是否必须
    channelUuid String channelId 必须

    响应(Response)

    • 响应头域 除公共头域外,无其它特殊头域。
    • 响应参数
    名称 类型 描述
    data []FabricChaincode chaincode信息列表

    示例

    • 请求示例
    GET /v1/fabric/chaincode/channel/c4f4235d-d843-49e3-9e1c-7cc703fa9ab6 HTTP/1.1
    Host: bbe.bj.baidubce.com
    x-bce-date: 2019-01-06T06:55:42Z
    x-bce-request-id: b9485394-c7dc-3cfa-d454-57c34773d08c
    Authorization: bce-auth-v1/5fded23b03594981872fbfadaad70ef6/2019-01-06T06:55:42Z/1800/host/84bc3dd2774cf6a6276a86e0cc7680e01710a1b7cb1a87de552af581131c818f
    • 响应示例
    {
        "data": [
        	{
        		"name": "chaincode1",
        		"uuid": "8b87c63d-64ca-4ba8-a5da-ddc813732210",
        		"channelUuid": "c4f4235d-d843-49e3-9e1c-7cc703fa9ab6",
        		"networkUuid": "8b87c63d-64ca-4ba8-a5da-ddc813732210",
        		"orgName": "org1",
        		"version": "1.2.3",
        		"state": 2,
        		"path": "map",
        		"endorsementPolicy": "OR ('hdo5MSP.member')",
        		"initArgs": "init",
        		"createTime": "2018-12-25T06:52:10Z",
        		"instantiateTime": "2018-12-25T16:52:10Z",
        		"updatable": true,
        		"errMsg": "{\"org1\":\"success\"}"
        	},
        	{
        		"name": "chaincod2",
        		"uuid": "c7ea68c4-48c9-4dbc-b3e0-e02933c1bd9b",
        		"channelUuid": "c4f4235d-d843-49e3-9e1c-7cc703fa9ab6",
        		"networkUuid": "8b87c63d-64ca-4ba8-a5da-ddc813732210",
        		"orgName": "org1",
        		"version": "1.2.2",
        		"state": 5,
        		"path": "map",
        		"endorsementPolicy": "OR ('hdo5MSP.member')",
        		"initArgs": "init",
        		"createTime": "2018-12-25T03:24:10Z",
        		"instantiateTime": "2018-12-25T05:43:10Z",
        		"updatable": true,
        		"errMsg": "{\"org1\":\"success\"}"
        	}
        ]
    }
    上一篇
    升级Chaincode
    下一篇
    查询Chaincode详情