3. 获取WeIdentity DID Document
调用接口:
标题 | 描述 |
---|---|
接口名 | weid/api/invoke |
Method | POST |
Content-Type | application/json |
接口入参:
Key | Value | Required |
---|---|---|
functionName | getWeIdDocument | Y |
functionArg | Y | |
functionArg.weId | WeIdentity DID,与 SDK直接调用的方式入参 一致,下同 | Y |
transactionArg | N,传空 | |
v | 版本号 | Y |
接口入参示例:
- {
- "functionArg": {
- "weId": "did:weid:0x12025448644151248e5c1115b23a3fe55f4158e4153"
- },
- "transactionArg": {
- },
- "functionName": "getWeIdDocument",
- "v": "1.0.0"
- }
接口返回: application/json
Key | Value |
---|---|
ErrorCode | 错误码,0表示成功 |
ErrorMessage | 错误信息 |
respBody | WeIdentity DID Document |
返回示例:
- {
- "respBody": {
- "@context" : "https://w3id.org/did/v1",
- "id" : "did:weid:0x12025448644151248e5c1115b23a3fe55f4158e4153",
- "created" : 1553224394993,
- "updated" : 1553224394993,
- "publicKey" : [ ],
- "authentication" : [ ],
- "service" : [ ]
- },
- "ErrorCode": 0,
- "ErrorMessage": "success"
- }