Schema
Retrieves all credential schemas
Filter by schema type
Filter by schema name
Filter by schema version
Sort field
Sort order
Found
Bad Request - Invalid query parameters
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
Schema definition including name, type, version and credential subject
Name of the schema
DriverLicense
Type of the schema
https://schema.org/DriverLicense
Schema version
1
Created
Bad Request - Invalid input parameters
Unauthorized - Invalid client secret
Conflict - Schema already exists
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
Schema ID to retrieve
Found
Bad Request - Invalid schema ID format
Not Found - Schema with given ID does not exist
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
Schema ID to delete
No Content
Bad Request - Invalid schema ID format
Unauthorized - Invalid client secret
Not Found - Schema with specified ID not found
Conflict - Schema is in use by credentials
DELETE /v1/schemas/{id} HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Accept: */*
No content