Querying a Credential Schema
Function
This API is used to query a Credential schema by index.
URI
POST /v1/identity/query-credential-schema
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
orgID |
Yes |
String |
Organization ID. |
channelID |
Yes |
String |
Channel ID. |
cryptoMethod |
Yes |
String |
Encryption method, which is fixed at SW. |
cert |
Yes |
String |
User certificate. Add an explicit line break (\n) at the end of each line. |
sk |
Yes |
String |
User private key. Add an explicit line break (\n) at the end of each line. |
timestamp |
Yes |
String |
Timestamp. |
schemaIndex |
Yes |
String |
Schema index. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
creator |
String |
Creator identifier. |
title |
String |
Name. |
identifier |
String |
Credential schema identifier. |
attributes |
Array of Attribute objects |
Attribute information. |
version |
Integer |
Version. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name. |
type |
String |
Type. |
description |
String |
Description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. Minimum: 8 Maximum: 36 |
errorMsg |
String |
Error description. Minimum: 2 Maximum: 512 |
Example Requests
{ "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", "schemaIndex" : "1" }
Example Responses
Status code: 200
CredentialSchema Information
{ "creator" : "string", "title" : "string", "identifier" : "string", "attributes" : [ { "name" : "name", "type" : "someType", "description" : "Identity number" } ], "version" : 0 }
Status code: 500
Error response.
{ "errorCode" : "stringst", "errorMsg" : "string" }
Status Codes
Status Code |
Description |
---|---|
200 |
CredentialSchema Information |
500 |
Error response. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot