Skip to main content
Version: v4 (next)

Get a Credential Schema

MOD-CS-QRY-2

Get a single credential schema by its numeric ID.

Query Parameters

NameDescriptionMandatory
idID of the credential schema to getyes

Execute the Query

Usage

veranad query cs get-schema [id] --node $NODE_RPC --output json

Example

NODE_RPC=https://rpc.testnet.verana.network
SCHEMA_ID=3
veranad query cs get-schema $SCHEMA_ID --node $NODE_RPC --output json

Example response

{
"schema": {
"id": "3",
"created": "2025-10-06T07:14:58.914878265Z",
"modified": "2025-10-20T12:15:27.945453876Z",
"json_schema": "{\n \"$id\": \"vpr:verana:vna-testnet-1/cs/v1/js/3\",\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n ... \n}",
"issuer_grantor_validation_validity_period": 1,
"verifier_grantor_validation_validity_period": 1,
"issuer_validation_validity_period": 1,
"verifier_validation_validity_period": 1,
"holder_validation_validity_period": 1,
"issuer_onboarding_mode": "ISSUER_ONBOARDING_MODE_OPEN",
"verifier_onboarding_mode": "VERIFIER_ONBOARDING_MODE_OPEN"
}
}

Response fields

The response is a single CredentialSchema object. Proto3 JSON omits any field left at its default value.

FieldTypeDescription
iduint64Schema ID
createdtimestampCreation time
modifiedtimestampLast modification time
archivedtimestampSet when the schema is archived; absent otherwise
json_schemastringThe JSON schema document (with VPR_* placeholders resolved)
issuer_grantor_validation_validity_perioduint32Days an issuer-grantor validation stays valid
verifier_grantor_validation_validity_perioduint32Days a verifier-grantor validation stays valid
issuer_validation_validity_perioduint32Days an issuer validation stays valid
verifier_validation_validity_perioduint32Days a verifier validation stays valid
holder_validation_validity_perioduint32Days a holder validation stays valid
issuer_onboarding_modeenumISSUER_ONBOARDING_MODE_OPEN | ..._ECOSYSTEM_VALIDATION_PROCESS | ..._GRANTOR_VALIDATION_PROCESS
verifier_onboarding_modeenumVERIFIER_ONBOARDING_MODE_OPEN | ..._ECOSYSTEM_VALIDATION_PROCESS | ..._GRANTOR_VALIDATION_PROCESS
holder_onboarding_modeenumHOLDER_ONBOARDING_MODE_ISSUER_VALIDATION_PROCESS | ..._PERMISSIONLESS
pricing_asset_typeenumTU | COIN | FIAT
pricing_assetstringtu, a denom, or an ISO-4217 code
digest_algorithmstringsha256, sha384, or sha512
ecosystem_iduint64ID of the Ecosystem that owns the schema
info

The example above is captured from the public testnet, whose node predates the v4 ecosystem_id, pricing_asset_type, pricing_asset, digest_algorithm, and holder_onboarding_mode fields — a v4 node returns these additional fields when they are set. The field table above is the authoritative v4 structure.