云服务器内容精选

  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 context String 内容 sequence String 颁发机构对应凭证的序列号 type Array of strings 可验证凭证类型 issuer String 签发者身份标识 issuanceDate String 签发日期 expirationDate String 凭证有效期 credentialSubject CredentialSubject object 凭证主题 revocation Revocation object 撤销 表3 CredentialSubject 参数 参数类型 描述 owner String 申请者的身份标识 type String 凭证类型 schemaID String schema ID dataURI String 数据URI encryptedAeskey String 加密对称密钥 uriType String 数据索引类型 dataHash String 数据hash值 表4 Revocation 参数 参数类型 描述 id String 撤销API或者撤销列表的url type String 撤销类型 状态码: 500 表5 响应Body参数 参数 参数类型 描述 errorCode String 错误码 最小长度:8 最大长度:36 errorMsg String 错误描述 最小长度:2 最大长度:512
  • 请求示例 { "orgID" : "4f1439758ebb41f7411b5f684b67713c08b89198", "channelID" : "mychannel", "cryptoMethod" : "SW", "cert" : "-----BEGIN CERTIFICATE-----\n...\n...\n-----END CERTIFICATE-----", "sk" : "------BEGIN PRIVATE KEY-----\n...\n...\n-----END PRIVATE KEY-----", "timestamp" : "2020-10-27T17:28:16+08:00", "vcIndex" : 0}
  • 响应示例 状态码: 200 VerifiableCredential Information { "context" : "https://www.w3.org/2018/credentials/v1", "sequence" : "x00123456", "type" : [ "VerifiableCredential", "AlumniCredential" ], "issuer" : "https://example.edu/issuers/565049", "issuanceDate" : "1606720551", "expirationDate" : "1606720551", "credentialSubject" : { "owner" : "did:example:ebfeb1f712ebc6f1c276e12ec21", "type" : "professional", "schemaID" : "did:example:ebfeb1f712ebc6f1c276e12ec21_IDCard", "dataURI" : "string", "encryptedAeskey" : "string", "uriType" : "index", "dataHash" : "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85" }, "revocation" : { "id" : "string", "type" : "string" }} 状态码: 500 失败响应 { "errorCode" : "stringst", "errorMsg" : "string"}
  • 请求参数 表1 请求Body参数 参数 是否必选 参数类型 描述 orgID 是 String 组织id channelID 是 String 通道id cryptoMethod 是 String 加密方法,目前固定为SW cert 是 String 用户证书,每行末尾均需要增加显式换行符\n sk 是 String 用户私钥,每行末尾均需要增加显式换行符\n timestamp 是 String 时间戳 vcIndex 是 String 凭证索引
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 creator String 创建者身份标识 最小长度:20 最大长度:100 title String 名称 最小长度:1 最大长度:50 identifier String 凭证模板标识 最小长度:1 最大长度:50 attributes Array of Attribute objects 属性信息 version Integer 版本 最小值:1 最大值:2147483647 表4 Attribute 参数 参数类型 描述 name String 名称 最小长度:0 最大长度:100 type String 类型 最小长度:0 最大长度:100 description String 描述信息 最小长度:0 最大长度:200 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:13 最大长度:13 error_msg String 错误信息 最小长度:1 最大长度:65535 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:13 最大长度:13 error_msg String 错误信息 最小长度:1 最大长度:65535
  • 响应示例 状态码: 400 请求错误 { "error_code" : "APAAS.40000002", "error_msg" : "Unexpected end of JSON input."} 状态码: 500 内部错误 { "error_code" : "TDIS.50000000", "error_msg" : "Internal error. Please contact the service provider."}