For the complete documentation index, see llms.txt. This page is also available as Markdown.

Schema APIs

Endpoints for creating, retrieving, updating, publishing, and deleting schemas in Guardian. Schemas define the structure of verifiable credential documents used in policies.

Authentication: Bearer token required (Authorization: Bearer <token>)


Method
Endpoint
Description
Auth Required

GET

/api/v1/schemas

Returns all schemas accessible to the current user

Yes

POST

/api/v1/schemas

Creates a new schema

Yes

PUT

/api/v1/schemas/{schemaId}

Updates a schema

Yes

DELETE

/api/v1/schemas/{schemaId}

Deletes a schema

Yes

PUT

/api/v1/schemas/{schemaId}/publish

Publishes a schema

Yes

POST

/api/v1/schemas/import/message

Imports a schema from an IPFS message ID

Yes

POST

/api/v1/schemas/import/file

Imports a schema from a ZIP file

Yes

POST

/api/v1/schemas/import/message/preview

Previews a schema from an IPFS message ID

Yes

POST

/api/v1/schemas/import/file/preview

Previews a schema from a ZIP file

Yes

GET

/api/v1/schemas/{schemaId}/export/message

Returns the schema IPFS message ID

Yes

GET

/api/v1/schemas/{schemaId}/export/file

Exports a schema as a ZIP file

Yes

GET

/api/v1/schemas/{topicId}

Returns all schemas for the specified topic

Yes

POST

/api/v1/schemas/{topicId}

Creates a schema under the specified topic

Yes

GET

/api/v1/schemas/{schemaId}/sub-schemas

Returns all child schemas

Yes

GET

/api/v1/schemas/{schemaId}

Returns a schema by ID

Yes

GET

/api/v1/schemas/{schemaId}/example

Returns a sample payload for the schema

Yes

DELETE

/api/v1/schemas/{topicId}/all

Deletes all schemas under the topic

Yes

Endpoints

Was this helpful?