Example Next.js Resource Server API

v0.5.3OpenAPI 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.

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

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

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

Demo

Unauthenticated operations showing validation and the error envelope

MethodPathAccess
GET/api/health

Liveness probe

Public
POST/api/echo

Echo a message

Public

Account

Operations available to any signed-in SchemaVaults user

MethodPathAccess
POST/api/ping

Authenticated ping

Authenticated
GET/api/whoami

Who am I

Authenticated
GET/api/me/email

My email address

Authenticatedscope:email

Admin

Operations restricted to platform administrators

MethodPathAccess
GET/api/admin/ping

Administrator ping

Admin

Organizations

Operations gated on organization membership

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

Organization greeting

Authenticatedorg member