Credential Schema APIs
Authorizations
TokenstringRequired
Query parameters
tagsstringOptionalExample:
tag1,tag2Responses
201
Credential Schemas
application/json
400
Invalid Input
500
error
get
/credential-schemaGET /api/v1/credential-schema HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
[
{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
"proof": {}
},
"tags": [
"text"
],
"status": "DRAFT",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}
]Authorizations
TokenstringRequired
Body
tagsstring[]Optional
statusstring · enumOptionalPossible values:
Responses
201
Credential Schema successfully created!
application/json
400
Invalid Input
500
error
post
/credential-schemaPOST /api/v1/credential-schema HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 479
{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}"
},
"tags": [
"text"
],
"status": "DRAFT"
}{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
"proof": {}
},
"tags": [
"text"
],
"status": "DRAFT",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}Authorizations
TokenstringRequired
Path parameters
idstringRequired
Responses
200
Response
application/json
400
Invalid Input
500
error
get
/credential-schema/{id}GET /api/v1/credential-schema/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
"proof": {}
},
"tags": [
"text"
],
"status": "DRAFT",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}If the schema is updated, a new semver will be generated and the old one will be deprecated. If only metadata (like tags/status) is updated, the semver will not be generated
Authorizations
TokenstringRequired
Path parameters
idstringRequired
Body
tagsstring[]Optional
statusstring · enumOptionalPossible values:
Responses
200
Credential Schema successfully updated!
application/json
Responseall of
400
Invalid Input
500
error
put
/credential-schema/{id}PUT /api/v1/credential-schema/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 479
{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}"
},
"tags": [
"text"
],
"status": "DRAFT"
}{
"schema": {
"type": "text",
"id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"version": "text",
"name": "text",
"author": "text",
"authored": "text",
"schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
"proof": {}
},
"tags": [
"text"
],
"status": "DRAFT",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text",
"deprecatedId": "text"
}Authorizations
TokenstringRequired
Query parameters
schemaIdstringRequired
Responses
200
Response
application/json
Responseall of
400
Invalid Input
500
error
get
/templateGET /api/v1/template?schemaId=text HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}Authorizations
TokenstringRequired
Body
templatestringOptional
It should be valid string in handlebar format
schemaIdstringOptionalExample:
did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1Responses
201
Rendering template successfully created!
application/json
400
Invalid Input
500
error
post
/templatePOST /api/v1/template HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 120
{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1"
}{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}Authorizations
TokenstringRequired
Path parameters
idstringRequired
Responses
200
Response
application/json
Responseall of
400
Invalid Input
500
error
get
/template/{id}GET /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}Create a new version of template
Authorizations
TokenstringRequired
Path parameters
idstringRequired
Body
templatestringOptional
It should be valid string in handlebar format
schemaIdstringOptionalExample:
did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1Responses
200
Rendering template successfully updated!
application/json
Responseall of
400
Invalid Input
500
error
put
/template/{id}PUT /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 120
{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1"
}{
"template": "text",
"schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
"templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
"createdAt": "text",
"updatedAt": "text",
"createdBy": "text",
"updatedBy": "text"
}Authorizations
TokenstringRequired
Path parameters
idstringRequired
Responses
200
Credential Schema successfully deleted!
No content
400
Invalid Input
500
error
delete
/template/{id}DELETE /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
No content
Last updated