A Pinboard node serves three surfaces on one port. Every node in a fleet serves all of them; put any number behind one load balancer URL.
https://pinboard.example.comSurfaces
| Surface | Paths | Caller | Auth |
|---|---|---|---|
| Routing | /{namespace}/{id}/... | Browsers, apps, other instances | Data-plane rules, optional |
| Worker API | POST /registry/register, heartbeat, release, tag, deregister | pinned workers | pinboard:worker scope |
| Operator API | /registry/health, workers, overview, stats, wind_down, drain, undrain, /metrics | Dashboards, scripts | pinboard:operator scope |
| Probes | /healthz, /readyz | Load balancers, Kubernetes | None |
Pinboard also calls each worker. Those endpoints are listed in Worker callbacks.
Endpoints
| Method | Path | Page |
|---|---|---|
ANY | /{namespace}/{id}{rest} | Proxy a request |
POST | /registry/register | Register a worker |
POST | /registry/heartbeat | Heartbeat |
POST | /registry/release | Release placements |
POST | /registry/tag | Tag a placement |
POST | /registry/deregister | Deregister |
GET | /registry/health | Node health |
GET | /registry/workers | List workers |
GET | /registry/overview | Fleet overview |
GET | /registry/stats | Worker stats |
POST | /registry/wind_down | Wind down placements |
POST | /registry/drain | Drain a client |
POST | /registry/undrain | Undrain a client |
GET | /metrics | Prometheus metrics |
GET | /healthz | Liveness |
GET | /readyz | Readiness |
Conventions
- Request and response bodies are JSON (
content-type: application/json) unless a page says otherwise. - Request bodies are capped at 1 MiB, 8 MiB for
/registry/register. /registry/*routes match path and method exactly. A wrong method answers404 {"error":"not found"}./healthzand/readyzanswer any method.- Times on the wire:
expiresInMsanduptimeMsare milliseconds;deadlineanddrainDeadlineare relative seconds (fractional);expiryanddegradedSinceare Unix epoch milliseconds. - Placement epochs are decimal strings, compared numerically.
- Failures return
{"error": "..."}. See Errors.
Base path
With the createPinboard({ basePath }) option set (for example /v2; there is no env variable for it), every route except /metrics lives under it: /v2/registry/register, /v2/{namespace}/{id}. A request outside the base path answers 404 {"error":"not found"}.
Modes
Two server options change request shapes. Pages mark the differences.
| Mode | Option | Effect |
|---|---|---|
| Single-hostname | default | One placement world. Registrations carry no hostname. |
| Hostname-aware | PINBOARD_HOSTNAME_AWARE=1 | Workers register a hostname and per-namespace env. Requests route by the Host header. |