获取合约列表
更新时间:2020-04-09
获取合约列表
接口描述 获取已部署合约列表。
权限说明 请求发起人需要具有合法的AccessKeyID和SecretAccessKey才能发起请求。
注意事项
如果请求中没有用户验证信息(即匿名访问),返回403 Forbidden
,错误信息:AccessDenied
。
请求(Request)
-
请求语法
GET /v1/quorum/contracts?consortiumUuid={ConsortiumUuid}&orgUuid={OrgUuid} HTTP/1.1 Host: bbe.bj.baidubce.com x-bce-date: <x-bce-date> x-bce-request-id: <x-bce-request-id> Authorization: <Authorization>
- 请求头域 除公共头域外,无其它特殊头域。
-
请求参数
名称 类型 位置 描述 是否必须 consortiumUuid String Query参数 联盟Uuid 必须 orgUuid String Query参数 组织Uuid 必须
响应(Response)
- 响应头域 除公共头域外,无其它特殊头域。
-
响应参数
名称 类型 描述 contractUuid String 合约Uuid consortiumUuid String 联盟Uuid orgUuid String 组织Uuid name String 合约名称 description String 合约描述 type String 合约类型,platform为平台基础库合约,user为用户自定义合约 status String 合约状态,包含None Deployed、Deployed、Deploying和Deployment Failed四种,分别为未部署、运行中,部署中,部署失败 ownerAddress String 合约发布者地址 isPrivate Bool 是否为私有合约 privateFor Array 私钥合约交易地址 createdTime String 创建时间 updatedTime String 更新时间 address String 合约地址 失败响应参考错误码部分。
示例
-
请求示例
GET /v1/quorum/contracts?orgUuid=988ba131-e04b-8111-b44f-fb35b8dc80e6&consortiumUuid=cb73ac79-62bc-6070-aadc-24a05eaf55ae HTTP/1.1 Host: bbe.bj.baidubce.com x-bce-date: 2019-10-23T06:26:02Z x-bce-request-id: b9485394-c7dc-3cfa-d454-57c34773d08c Authorization: bce-auth-v1/98cdcde27d8e464d895222fd8023a029/2019-10-23T06:26:02Z/1800/host/1e88313cae40a47550bdf0e3bfa591c06e4443c1ed690d510032e084676b00f8
-
响应示例
200 Content-Length: 1335 Content-Type: application/json; charset=utf-8 Date: Wed, 23 Oct 2019 06:26:02 GMT { "pageNo": 1, "pageSize": 2, "result": [{ "contractUuid": "3f90151d-a416-4ca5-99df-dcecf5bfb09e", "consortiumUuid": "cb73ac79-62bc-6070-aadc-24a05eaf55ae", "orgUuid": "988ba131-e04b-8111-b44f-fb35b8dc80e6", "name": ":Simple", "description": ":Simple", "type": "user", "status": "Deployed", "ownerAddress": "0x4345d073d9e947fb148802b25c7b6d996bac11a1", "isPrivate": true, "privateFor": [ "1wXBgBiyXxaqw/lhlt2om/IdRPNmmiWJvrVDi38ojw0=", "gQTX2Tam6aM9/7o+b3ttE+YaTkudJpBVR9T8+/PkBC4=" ], "createdTime": "2019-10-29T16:05:53+08:00", "updatedTime": "2019-10-29T16:05:53+08:00", "address": "0x46331570c943501915c88ced7a33d979bcb36572" }, { "contractUuid": "840ff186-950e-4169-90f0-69f0a073cac4", "consortiumUuid": "cb73ac79-62bc-6070-aadc-24a05eaf55ae", "orgUuid": "988ba131-e04b-8111-b44f-fb35b8dc80e6", "name": ":SimplePrivate", "description": ":Simple", "type": "user", "status": "Deployed", "ownerAddress": "0x4345d073d9e947fb148802b25c7b6d996bac11a1", "isPrivate": false, "privateFor": [], "createdTime": "2019-10-29T16:05:09+08:00", "updatedTime": "2019-10-29T16:05:09+08:00", "address": "0xea5475c749c93df7c30fd777f2114e3dfbf35bfd" } ] }