Skip to main content
PATCH
/
v1
/
admin
/
portfolios
/
:portfolioId
/
mirrorable
Admin Portfolio Mirrorability
curl --request PATCH \
  --url https://api.glider.fi/v1/admin/portfolios/:portfolioId/mirrorable \
  --header 'X-API-KEY: <api-key>'
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": true
}
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.
{
  "canMirror": false,
  "isPublic": true
}

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:
{
  "success": true,
  "data": {
    "blueprintId": "bp_...",
    "canMirror": true,
    "isPublic": true,
    "portfolioId": "s_..."
  }
}

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:
{
  "canMirror": true
}
Response:
{
  "success": true,
  "data": {
    "ownerAddress": "0xf27de7c0d516b5dbc752b0ed13f582fb2d62a0cf",
    "canMirror": true,
    "isPublic": true,
    "totalOwnedBlueprintCount": 12,
    "eligiblePublicBlueprintCount": 10,
    "skippedPrivateBlueprintCount": 2,
    "alreadyInDesiredStateBlueprintIds": ["bp_existing"],
    "updatedBlueprintIds": ["bp_updated"],
    "legacySyncFailedBlueprintIds": []
  }
}

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 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