Skip to main content
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.

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
Path params:
  • userId: canonical platform user id whose linked addresses define portfolio ownership
Body:
Rules:
  • portfolioIds must be a non-empty array
  • maximum 200 portfolio ids per request
  • the route returns 403 if 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 config
  • snapshotHash: derived from the latest control-plane context snapshot
  • controlPlaneSummary: the canonical portfolio convergence plus reviewQueue summary 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-source
  • apps/agent-control-plane via the private CONTROL_PLANE_SOURCE service binding
Related internal admin routes:
  • POST /v1/admin/control-plane/workflow-monitors/due
  • POST /v1/admin/control-plane/workflow-monitors/tick