7. 查询CPT
调用接口:
标题 | 描述 |
---|---|
接口名 | weid/api/invoke |
Method | POST |
Content-Type | application/json |
接口入参:
Key | Value | Required |
---|---|---|
functionName | queryCpt | Y |
functionArg | Y | |
functionArg.cptId | CPT ID,与 SDK直接调用的方式入参 一致。 | Y |
transactionArg | N,传空 | |
v | 版本号 | Y |
接口入参示例:
- {
- "functionArg": {
- "cptId": 10,
- },
- "transactionArg": {
- },
- "functionName": "queryCpt",
- "v": "1.0.0"
- }
接口返回: application/json
Key | Value |
---|---|
ErrorCode | 错误码,0表示成功 |
ErrorMessage | 错误信息 |
respBody | 完整的CPT信息 |
接口返回示例:
- {
- "respBody": {
- "cptBaseInfo" : {
- "cptId" : 10,
- "cptVersion" : 1
- },
- "cptId" : 10,
- "cptJsonSchema" : {
- "$schema" : "http://json-schema.org/draft-04/schema#",
- "title" : "a CPT schema",
- "type" : "object"
- },
- "cptPublisher" : "did:weid:0x104a58c272e8ebde0c29083552ebe78581322908",
- "cptSignature" : "HJPbDmoi39xgZBGi/aj1zB6VQL5QLyt4qTV6GOvQwzfgUJEZTazKZXe1dRg5aCt8Q44GwNF2k+l1rfhpY1hc/ls=",
- "cptVersion" : 1,
- "created" : 1553503354555,
- "metaData" : {
- "cptPublisher" : "did:weid:0x104a58c272e8ebde0c29083552ebe78581322908",
- "cptSignature" : "HJPbDmoi39xgZBGi/aj1zB6VQL5QLyt4qTV6GOvQwzfgUJEZTazKZXe1dRg5aCt8Q44GwNF2k+l1rfhpY1hc/ls=",
- "created" : 1553503354555,
- "updated" : 0
- },
- "updated" : 0
- },
- "ErrorCode": 0,
- "ErrorMessage": "success"
- }