Schema
Retrieves all credential schemas
Query parameters
typestringOptional
Filter by schema type
namestringOptional
Filter by schema name
versionnumber · doubleOptional
Filter by schema version
sortBystring · enumOptionalPossible values:
Sort field
sortOrderstring · enumOptionalPossible values:
Sort order
Responses
200
Found
application/json
400
Bad Request - Invalid query parameters
application/json
get
GET /v1/schemas HTTP/1.1
Host: api
Accept: */*
[
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"type": "https://schema.org/DriverLicense",
"name": "DriverLicense",
"version": 1,
"schemaUri": "https://example.com/schemas/driver-license"
},
{
"id": "5f2e7ddc-2b95-4b84-a7b8-1a87f1795c89",
"type": "https://schema.org/Person",
"name": "Person",
"version": 2,
"schemaUri": "https://example.com/schemas/person"
}
]
Creates a new credential schema
Authorizations
Body
Schema definition including name, type, version and credential subject
namestringRequiredExample:
Name of the schema
DriverLicense
typestringRequiredExample:
Type of the schema
https://schema.org/DriverLicense
versionnumber · doubleOptionalExample:
Schema version
1
Responses
201
Created
application/json
400
Bad Request - Invalid input parameters
application/json
401
Unauthorized - Invalid client secret
application/json
409
Conflict - Schema already exists
application/json
post
POST /v1/schemas HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 148
{
"name": "DriverLicense",
"type": "https://schema.org/DriverLicense",
"version": 1,
"credentialSubject": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"type": "https://schema.org/DriverLicense",
"name": "DriverLicense",
"version": 1,
"schemaUri": "https://example.com/schemas/driver-license"
}
Retrieves a specific credential schema by ID
Path parameters
idstringRequired
Schema ID to retrieve
Responses
200
Found
application/json
Responseobject
400
Bad Request - Invalid schema ID format
application/json
404
Not Found - Schema with given ID does not exist
application/json
get
GET /v1/schemas/{id} HTTP/1.1
Host: api
Accept: */*
{
"$id": "https://example.com/schemas/driver-license",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"dateOfBirth": {
"type": "string",
"format": "date"
},
"licenseClass": {
"type": "string",
"enum": [
"A",
"B",
"C",
"D"
]
}
},
"required": [
"id",
"name",
"licenseClass"
]
}
Deletes a specific credential schema
Authorizations
Path parameters
idstringRequired
Schema ID to delete
Responses
204
No Content
400
Bad Request - Invalid schema ID format
application/json
401
Unauthorized - Invalid client secret
application/json
404
Not Found - Schema with specified ID not found
application/json
409
Conflict - Schema is in use by credentials
application/json
delete
DELETE /v1/schemas/{id} HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Accept: */*
No content