Admin Control Plane Snapshot
Internal Admin Endpoints
Admin Control Plane Snapshot
Internal-only endpoint for projecting authoritative portfolio approvals and runs into the Cloudflare control-plane
POST
Admin Control Plane Snapshot
This endpoint returns authoritative control-plane snapshots for a supplied user
and portfolio set. It is intended for internal control-plane sync and pull
flows, not public product traffic.
Rules:
Scope
- Internal-only
- Protected by
ADMIN_AUTH_SECRET_TOKEN - Validates that every requested portfolio is owned by the supplied
userId
Request
Headers:Authorization: Bearer <ADMIN_AUTH_SECRET_TOKEN>Content-Type: application/json
userId: canonical platform user id whose linked addresses define portfolio ownership
portfolioIdsmust be a non-empty array- maximum 200 portfolio ids per request
- the route returns
403if any requested portfolio is not linked to the supplied user
Response
Runtime Behavior
platform-api resolves the supplied userId to linked wallet addresses, then
asks the ownership reader for canonically owned portfolio ids. Only after that
ownership check passes does it call the portfolio control-plane facade to
allocate a persisted per-portfolio revision and read the snapshot source rows
in the same database transaction. Portfolio valuation summaries and optional
account intelligence are also materialized before that transaction releases its
per-portfolio revision locks, so the complete payload follows the same ordering.
projectionVersion is the allocated revision encoded as a required, zero-padded
20-digit string so consumers can compare it lexicographically. Read-only summary
and dashboard paths do not allocate projection revisions.
The current route also emits stable portfolio metadata when available:
policyVersion: derived from the stored smart-portfolio policy configsnapshotHash: derived from the latest control-plane context snapshotcontrolPlaneSummary: the canonical portfolioconvergenceplusreviewQueuesummary already used by shared services
projectionVersion is always present. If no policy config or context snapshot
exists yet, their identity fields return null.
This route is the current upstream source for:
apps/agent-control-plane-sourceapps/agent-control-planevia the privateCONTROL_PLANE_SOURCEservice binding
POST /v1/admin/control-plane/workflow-monitors/duePOST /v1/admin/control-plane/workflow-monitors/tick