Skip to content

API endpoints

The canonical contract lives in apigw-go/openapi.yaml. That file is what Yandex API Gateway loads at deploy time and what the wizard generates code against. This page is the human-readable version of the most-used endpoints.

All authenticated requests carry a naasson_session cookie set by the OAuth callback. JWT is HS256, 24-hour TTL, signed with a Lockbox secret.

Auth

MethodPathPurpose
GET/auth/providersList configured OAuth providers
GET/auth/yandex/authorizeBegin Yandex OAuth
GET/auth/google/authorizeBegin Google OAuth
GET/auth/github/authorizeBegin GitHub OAuth
GET/auth/meReturn the authenticated user’s record
POST/auth/logoutClear the session cookie
GET/auth/me/oauth-accountsList linked OAuth accounts
POST/auth/link/confirmAttach a pending provider link
POST/auth/unlinkDetach a provider
GET/auth/edge-handoff?next=…Cross-domain SSO — mint 30s JWT, 302 to edge

Workspaces

MethodPathPurpose
GET/workspacesList the caller’s workspaces
POST/workspacesCreate a workspace (label, adapter_kind)
GET/workspaces/{id}Fetch one workspace (owner only)

Tunnel routes

MethodPathPurpose
POST/tunnel-agentsMint a one-time agent token for a workspace
GET/tunnel-routesList the caller’s active routes
POST/tunnel-routesCreate a route fqdn → (agent, target_port)
DELETE/tunnel-routes/{fqdn}Revoke a route

Routes enforce dual ownership as of 2026-05-16: both the workspace and the agent must belong to the caller. See Security model.

Products

MethodPathPurpose
GET/products/catalogRead-mostly catalog (YDB-backed)
GET/products/search?q=Substring search across the catalog
GET/products/tagsTag list with counts (drives sidebar chips)
GET/products/{id}/wizard-configPer-product wizard schema

Drafts

MethodPathPurpose
GET/drafts/{slug}Read a wizard draft
PUT/drafts/{slug}Save / overwrite a draft

Deployments

MethodPathPurpose
POST/deploysEnqueue a deployment (writes YMQ)
GET/deploysList the caller’s deployments
GET/deploys/{id}/statusStream-friendly status snapshot
DELETE/deploys/{id}Cancel + cleanup

Payments

MethodPathPurpose
POST/payments/initBegin a YooKassa top-up
POST/payments/webhookYooKassa webhook (signature-verified)

Mesh, Rental, Batch

The dispatched api-mesh, api-rental, and api-batch fat-functions cover Modes 2-5. See the OpenAPI spec for the full list — these are in production but their UI is rolled out gradually. Notable shapes:

  • POST /mesh/invites/{code}/redeem — peer joins your mesh
  • POST /rental/listings — register idle compute for rent
  • POST /rental/bookings — book someone’s listing
  • POST /batch/submit — push a sharded WASM job
  • GET /batch/{id}/status — poll job status

How to use this from code

A minimal authenticated probe (after you’ve signed in once):

Terminal window
JWT=$(open https://cloud.naasson.com # sign in, then copy
# the naasson_session cookie
# value from DevTools)
curl -sS https://api.cloud.naasson.com/auth/me \
-H "Cookie: naasson_session=$JWT" | jq

The full smoke test that exercises the registration flow lives in the repo at scripts/smoke-registration-flow.sh.