区块链服务 BCS-查询DID:响应示例

时间:2024-07-01 09:12:14

响应示例

状态码: 200

分布式身份文档结构体

{
  "context" : "https://www.w3.org/ns/did/v1",
  "id" : "did:example:ebfeb1f712ebc6f1c276e12ec21",
  "publicKey" : [ {
    "id" : "string",
    "type" : "string",
    "controller" : "string",
    "publicKeyPem" : "string"
  } ],
  "authentication" : [ "did:example:ebfeb1f712ebc6f1c276e12ec21#key-0" ],
  "recovery" : "string",
  "service" : [ {
    "id" : "did:example:ebfeb1f712ebc6f1c276e12ec21#xdi",
    "type" : "XdiService",
    "serviceEndpoint" : "https://xdi.example.com/8377464",
    "credentialApplySchema" : {
      "type" : "LegalCitizen",
      "name" : "LegalCitizen",
      "description" : "Certified Chinese citizens",
      "attributes" : [ {
        "name" : "name",
        "type" : "someType",
        "description" : "Identity number"
      } ]
    }
  } ],
  "proof" : {
    "creator" : "did:example:ebfeb1f712ebc6f1c276e12ec21",
    "type" : "RsaSignature2018",
    "created" : "1606720551",
    "signatureValue" : "eyJhbGciOiJSUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0I      PAYuNzVBAh4vGHSrQyHUdBBPM"
  },
  "created" : "1588921521",
  "updated" : "",
  "status" : "active"
}

状态码: 500

失败响应

{
  "errorCode" : " BCS .5002034",
  "errorMsg" : "request timed out or been cancelled"
}
support.huaweicloud.com/devg-bcs/ShowDID_0.html