Skip to main content
Version: v4 (next)

List Schema Authorization Policies

MOD-CS-QRY-6

List all Schema Authorization Policy (SAP) versions for a (schema-id, role) pair, ordered by ascending version.

Query Parameters

NameDescriptionMandatory
schema-idID of the credential schemayes
roleRole to list: 1 = ISSUER, 2 = VERIFIERyes

Execute the Query

Usage

veranad query cs list-sap [schema-id] [role] --node $NODE_RPC --output json

Example

List all issuer policies for schema 1:

veranad query cs list-sap 1 1 --node $NODE_RPC --output json

List all verifier policies for schema 1:

veranad query cs list-sap 1 2 --node $NODE_RPC --output json

Response schema

No SAP has been created on the public networks yet, so no live output is available. The response is QueryListSchemaAuthorizationPoliciesResponse, a policies array of SchemaAuthorizationPolicy objects (ordered by ascending version). Each object has the fields documented in Get a Schema Authorization Policy:

{
"policies": [
{
"id": "...",
"schema_id": "1",
"role": "SCHEMA_AUTHORIZATION_POLICY_ROLE_ISSUER",
"url": "...",
"digest_sri": "...",
"effective_from": "...",
"effective_until": null,
"revoked": false,
"created": "...",
"version": 1
}
]
}