SchemaVaults logoSchemaVaultsAuth example app

Example Next.js Resource Server API

v0.10.1OpenAPI 3.1.0

Demo API of the SchemaVaults example resource server. Every operation is declared with @schemavaults/openapi-operations; this document and the /docs pages are generated from those declarations.

Server
https://example-nextjs-resource-server.schemavaults.com
(This resource server)

Authentication

How to present credentials to this API. Each operation lists which of these it accepts.

  • Access token (Bearer)schemavaults-access-tokenhttp
    Authorization: Bearer <JWT>

    Access token issued by the auth server for this API server.

    Missing credentials answer with WWW-Authenticate: Bearer realm="schemavaults"

Scopes

What each OAuth 2.0 scope allows. An operation that requires scopes refuses tokens whose scope claim lacks any of them.

Demo

Unauthenticated operations showing validation and the error envelope

MethodPath
GET/api/health

Liveness probe

Public
POST/api/echo

Echo a message

Public

Account

Operations available to any signed-in SchemaVaults user

MethodPath
POST/api/ping

Authenticated ping

Authenticated
GET/api/whoami

Who am I

Authenticated
GET/api/me/email

My email address

Authenticatedscope:email
GET/api/me/notes

My notes

Authenticatedscope:example:notes.read
POST/api/me/account-deletion

Request deletion of my account

Authenticatedno delegated callers

Admin

Operations restricted to platform administrators

MethodPath
GET/api/admin/ping

Administrator ping

Admin

Organizations

Operations gated on organization membership

MethodPath
GET/api/organizations/{organization_id}/greeting

Organization greeting

Authenticatedorg member