7. 查询CPT

调用接口:

标题描述
接口名weid/api/invoke
MethodPOST
Content-Typeapplication/json

接口入参:

KeyValueRequired
functionNamequeryCptY
functionArg Y
functionArg.cptIdCPT ID,与 SDK直接调用的方式入参 一致。Y
transactionArg N,传空
v版本号Y

接口入参示例:

  1. {
  2. "functionArg": {
  3. "cptId": 10,
  4. },
  5. "transactionArg": {
  6. },
  7. "functionName": "queryCpt",
  8. "v": "1.0.0"
  9. }

接口返回: application/json

KeyValue
ErrorCode错误码,0表示成功
ErrorMessage错误信息
respBody完整的CPT信息

接口返回示例:

  1. {
  2. "respBody": {
  3. "cptBaseInfo" : {
  4. "cptId" : 10,
  5. "cptVersion" : 1
  6. },
  7. "cptId" : 10,
  8. "cptJsonSchema" : {
  9. "$schema" : "http://json-schema.org/draft-04/schema#",
  10. "title" : "a CPT schema",
  11. "type" : "object"
  12. },
  13. "cptPublisher" : "did:weid:0x104a58c272e8ebde0c29083552ebe78581322908",
  14. "cptSignature" : "HJPbDmoi39xgZBGi/aj1zB6VQL5QLyt4qTV6GOvQwzfgUJEZTazKZXe1dRg5aCt8Q44GwNF2k+l1rfhpY1hc/ls=",
  15. "cptVersion" : 1,
  16. "created" : 1553503354555,
  17. "metaData" : {
  18. "cptPublisher" : "did:weid:0x104a58c272e8ebde0c29083552ebe78581322908",
  19. "cptSignature" : "HJPbDmoi39xgZBGi/aj1zB6VQL5QLyt4qTV6GOvQwzfgUJEZTazKZXe1dRg5aCt8Q44GwNF2k+l1rfhpY1hc/ls=",
  20. "created" : 1553503354555,
  21. "updated" : 0
  22. },
  23. "updated" : 0
  24. },
  25. "ErrorCode": 0,
  26. "ErrorMessage": "success"
  27. }