3. 获取WeIdentity DID Document

调用接口:

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

接口入参:

KeyValueRequired
functionNamegetWeIdDocumentY
functionArg Y
functionArg.weIdWeIdentity DID,与 SDK直接调用的方式入参 一致,下同Y
transactionArg N,传空
v版本号Y

接口入参示例:

  1. {
  2. "functionArg": {
  3. "weId": "did:weid:0x12025448644151248e5c1115b23a3fe55f4158e4153"
  4. },
  5. "transactionArg": {
  6. },
  7. "functionName": "getWeIdDocument",
  8. "v": "1.0.0"
  9. }

接口返回: application/json

KeyValue
ErrorCode错误码,0表示成功
ErrorMessage错误信息
respBodyWeIdentity DID Document

返回示例:

  1. {
  2. "respBody": {
  3. "@context" : "https://w3id.org/did/v1",
  4. "id" : "did:weid:0x12025448644151248e5c1115b23a3fe55f4158e4153",
  5. "created" : 1553224394993,
  6. "updated" : 1553224394993,
  7. "publicKey" : [ ],
  8. "authentication" : [ ],
  9. "service" : [ ]
  10. },
  11. "ErrorCode": 0,
  12. "ErrorMessage": "success"
  13. }