Skip to content
GatewayMarkdown

Gateway API

Every endpoint behind the gateway and enforcement points, on the realm's host and on the gateway itself, by area.

AvailableAPI

Every endpoint the gateway and your own enforcement points use. The realm serves the first four sections on its own host, https://foobar.cvyuh.com; the gateway serves the last on its own address.

Each part takes its own credential:

  • Admin calls (/api/v0/am/…) take a realm administrator’s session, as Cookie: x-cvyuh-token=$CVYUH_SESSION: see Call the API.
  • Enforcement calls (/policies/v1, /access/v1) take a bearer access token whose audience is the group they sit in, with the scope each row names. /access/v1 also takes an administrator’s session.
  • OAuth calls (/oauth2/…) take the calling client’s own credentials, as their standards say.

For an enforcement point that decides locally. Audience https://foobar.cvyuh.com/policies/v1. Both answer an ETag, and 304 to an If-None-Match that still holds.

MethodEndpointWhat it doesPage
GEThttps://foobar.cvyuh.com/policies/v1/export?policySet={set}The set’s active policies, comparators and acr values; policySet repeats, and with none every set comes back. Header X-Policies-Excluded counts what was left out. Scope policies:readDecide locally
GEThttps://foobar.cvyuh.com/policies/v1/revocationsEvery live revocation, in seven lists. Scope revocations:readRevocation feed

For an enforcement point that asks the realm, in the AuthZEN shape. Audience https://foobar.cvyuh.com/access/v1. Each echoes an x-request-id header.

MethodEndpointWhat it doesPage
POSThttps://foobar.cvyuh.com/access/v1/evaluationOne decision. Scope access:evaluateAsk the realm
POSThttps://foobar.cvyuh.com/access/v1/evaluationsSeveral decisions, with defaults and options.evaluations_semantic. Scope access:evaluateAsk the realm
POSThttps://foobar.cvyuh.com/access/v1/search/subjectThe users or agents a decision would allow, a page at a time. Scope access:searchSearch
POSThttps://foobar.cvyuh.com/access/v1/search/actionThe actions a decision would allow. Scope access:searchSearch
GEThttps://foobar.cvyuh.com/.well-known/authzen-configurationWhere each decision and search endpoint is. PublicAsk the realm

There is no resource search: https://foobar.cvyuh.com/access/v1/search/resource answers 404.

The OAuth endpoints the gateway, your APIs and your agents call for the tasks on these pages.

MethodEndpointWhat it doesPage
POSThttps://foobar.cvyuh.com/oauth2/tokenThe gateway’s own token (client_credentials), a token swap (token exchange), and a held request collected (urn:ietf:params:oauth:grant-type:deferred)Token swap, Agent guardrails
GEThttps://foobar.cvyuh.com/oauth2/jwksThe realm’s public signing keys, to verify tokens with. PublicCheck a token at your API
POSThttps://foobar.cvyuh.com/oauth2/introspectWhether a token is active, for an API that serves its audienceCheck a token at your API
POSThttps://foobar.cvyuh.com/oauth2/revokeRevoke a token, its family, or a held request’s code, by the client it was issued toRevoke a token

The admin objects these pages change. Every object is read and written the same way: see Call the API.

MethodEndpointWhat it doesPage
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client/floorGive the gateway’s client its key and resources, and activate itRun the gateway
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client?id={client}Register an enforcement point, an API or a calling serviceDecide locally
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/policy?id={policy}Write a policyGet started with Gateway
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/policy/{policy}/relationships/{policySet or resourceType}Link a policy to its set or its resource type, with If-MatchGet started with Gateway
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/resourceType?id={type}Create a resource type, such as the MCP typesMCP tool calls
POSThttps://foobar.cvyuh.com/api/v0/am/objects/v1/policySet?id={set}Create a policy setProtect an MCP server
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/agentSettings/agentSettingsSet the guardrails per risk classAgent guardrails
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/agent/{agent}Quarantine, kill or restore an agentWhat can be revoked
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/user/{user}Set a user inactive, and every token about them with themWhat can be revoked
PATCHhttps://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2SettingsOffer token exchange, the deferred grant, and status lists per APIToken swap

Policies themselves, every field and how a decision is reached, are on Policies.

The gateway serves these at its own address (LISTEN, and ADMIN_LISTEN for the last table), not on the realm’s host. Here the API’s audience is https://api.example.com, the address your TLS front end serves: the gateway itself listens on plain HTTP/1.1 behind it. Its image isn’t published yet: ask your Cvyūh contact for it.

MethodEndpointWhat it doesPage
Anyhttps://api.example.com/{path}The inline proxy: decided, then forwarded to BACKEND, or refusedRun the gateway
Anyhttps://api.example.com/ext_authz/{path}The check for a proxy of your own, with the request’s host in x-forwarded-host: 200 with x-agent-id, or the refusalPut the gateway behind your proxy
POSThttps://api.example.com/{MCP path}An MCP call, decided as the tool, resource or prompt it names, on a path in MCP_PATHSMCP tool calls
GEThttps://api.example.com/.well-known/oauth-protected-resourceThe API’s resource metadata, followed by the audience’s path when it has one. PublicResource metadata
MethodEndpointWhat it doesPage
GET/health/live, /health/ready, /health/startup, /health/backendsHealth probesHealth and logging
GET, PUT/admin/logRead or change the log level while it runsHealth and logging
PUT/admin/log/filterReplace the whole log filter, when Cvyūh support asks you toHealth and logging