Empeiria Documentation
  • Getting Started
    • Welcome to Empeiria
    • 5 minutes Quickstart
    • Tutorial: Credential Issuance & Verification
      • Overview
      • Understanding Key Concepts
      • Project Setup
      • Deploying the Issuer
      • Uploading the Credential Schema
      • Issuing Credentials
      • Frontend for Credential Issuance
      • Testing Credential Issuance
      • Deploying the Verifier
      • Setting Up the Verification Flow
      • Creating a Verification Endpoint
      • Creating a Protected Dashboard
      • Testing the Verification Flow
      • Summary & Next Steps
  • Understand
    • EVDI Architecture
    • Self-Sovereign Identity
      • Technical Foundations
      • Roles in the SSI framework
      • Protocols and Standards
  • Develop
    • One-click deployment
      • Introduction
      • Registration
      • Login
      • Creating an Issuer
      • Issuer Data Description
      • Creating a Verifier
      • Verifier Data Description
    • Issuer
      • Terminology and Concepts
      • DID Document Management
      • Schema Management
      • Issuing Credentials and Interacting With Wallets
      • Revocations
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • MCP Server Integration
      • FAQ
      • API Reference
        • Token
        • Schema
        • Offering
        • Metadata
        • Credential
        • Blockchain
        • Authorization
    • Verifier
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • Query Language
      • Client Configuration
      • Frontend Integration
      • Revocations
      • Server-Side VP Queries
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • MCP Server Integration
      • FAQ
      • API Reference
        • VP Query
        • QR Code
        • Authorization
    • Wallet SDK (Coming soon)
    • Introduction to cosmwasm
  • Empe Blockchain
    • Overview
    • Chain Architecture
      • Auth
      • Authz
      • Bank
      • Distribution
      • Governance
      • Staking
      • IBC
      • DidDoc
      • Vesting
      • Minter
      • Stablefee
      • LinkedResources
    • Important links
    • Validators Guide
      • New validator
      • Hardware requirements
      • Required software installation
      • Go installation
      • Install prebuild binary
      • Install binary from source code (option B)
      • Configure a node
      • Cosmovisor setup
      • Install wasmvm
      • Sync with state-sync
      • Full state sync from archive snapshot
      • Latest snapshot
      • Run a Validator
      • Migration to v0.2.2
      • Migration to v0.3.0
      • Migration to v0.4.0
      • FAQ
  • User Guide
    • Empe DID Wallet
      • Intro
      • Download and first launch
      • Create or import did
      • Main screen overview
      • How to claim credential from issuer
      • How to use credential with verifier
      • Settings and other options
    • Keplr Wallet and Blockchain Operations
      • How to Connect Keplr Wallet
    • Ping Pub operation
    • Staking Tokens Guide
    • Voting on Governance Proposals Guide
    • Sending Tokens Guide
    • Airdrop
      • On-Chain Testnet Airdrop
      • Faucet Guide: How to Claim Testnet Tokens?
  • Appendix
    • Glossary
Powered by GitBook
On this page
  1. Develop
  2. Issuer
  3. API Reference

Schema

PreviousTokenNextOffering

Get a schema by ID

get

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"
  ]
}

Delete a schema by ID

delete

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

  • GETList all credential schemas
  • POSTCreate a new credential schema
  • GETGet a schema by ID
  • DELETEDelete a schema by ID

List all credential schemas

get

Retrieves all credential schemas

Query parameters
typestringOptional

Filter by schema type

namestringOptional

Filter by schema name

versionnumber · doubleOptional

Filter by schema version

sortBystring · enumOptional

Sort field

Possible values:
sortOrderstring · enumOptional

Sort order

Possible values:
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"
  }
]

Create a new credential schema

post

Creates a new credential schema

Authorizations
Body

Schema definition including name, type, version and credential subject

namestringRequired

Name of the schema

Example: DriverLicense
typestringRequired

Type of the schema

Example: https://schema.org/DriverLicense
versionnumber · doubleOptional

Schema version

Example: 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"
}