Skip to main content
PATCH
Admin Portfolio Mirrorability
These endpoints let operators set the mirrorability state for existing Glider portfolio blueprints before the public mirroring product surface is deployed.

Auth

All routes are protected by the platform admin token:
  • Authorization: Bearer <admin-token>
  • Content-Type: application/json

Request Body

All mirrorability endpoints accept the same request body:
canMirror is the target mirrorability state. isPublic is optional. When omitted, enabling mirroring also marks the blueprint public; disabling mirroring leaves the existing visibility unchanged.

Update One Portfolio

PATCH /v1/admin/portfolios/:portfolioId/mirrorable portfolioId is the strategy instance / portfolio id. The backend resolves the source portfolio to its DB-v2 strategy blueprint, updates strategy_blueprints.can_mirror, and writes the same state to the legacy blueprint row when a legacy id exists. Passing a mirrored child portfolio is rejected because mirrorability belongs to the source blueprint. Response:

Update One Strategy Blueprint

PATCH /v1/admin/strategy-blueprints/:blueprintId/mirrorable blueprintId is the strategy blueprint/template id. Operators usually pass the legacy template id returned to clients as blueprintTemplateId, for example 01KVXD93001RE2NVTRT8A66C1C. The endpoint resolves that id directly to the DB-v2 strategy blueprint, validates its head version, updates strategy_blueprints.can_mirror, and writes the same state to the legacy blueprint row when a legacy id exists. The route also accepts a numeric DB-v2 blueprint id as a fallback for ops-only repair work. Response:

Update Glider-Owned Public Portfolios

PATCH /v1/admin/portfolios/mirrorable/glider-owned Updates mirrorability for every public DB-v2 blueprint owned by the Glider account 0xf27de7c0d516b5dbc752b0ed13f582fb2d62a0cf. Private blueprints are skipped. The endpoint validates head versions before mutating so a bad DB-v2 head pointer does not produce a partial batch. If a required legacy write fails after a DB-v2 write, the DB-v2 update is rolled back and the request fails. Bulk updates only select blueprints that are public at request start; explicit isPublic controls their final visibility. Request:
Response:

Update Public Portfolios For An Owner

PATCH /v1/admin/portfolios/mirrorable/owners/:ownerAddress Updates mirrorability for every public DB-v2 blueprint owned by the supplied EVM or Solana owner address. Private blueprints are skipped. This uses the same request body, validation, legacy write, and rollback behavior as the Glider-owned shortcut.

Errors

  • 401: missing or invalid admin token
  • 403: attempted to toggle mirrorability from a mirrored child portfolio
  • 404: portfolio or DB-v2 blueprint was not found
  • 500: DB-v2 repository unavailable, invalid head pointer, or required legacy write failure