Internal-only token icon SVG preview and CDN upload endpoints for Retool
These endpoints let internal tools prepare scalable token icon SVGs for the Glider CDN. Retool sends a token symbol and uploaded SVG contents;Documentation Index
Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
Use this file to discover all available pages before exploring further.
platform-api validates the SVG, rejects unsafe/oversized assets, normalizes
the canvas to viewBox="0 0 24 24", optimizes the SVG, and can upload the
result to the configured GCS bucket.
Authorization: Bearer <RETOOL_TOKEN_ICONS_ADMIN_TOKEN>Content-Type: application/jsonADMIN_AUTH_SECRET_TOKEN is also accepted for internal engineer/admin usage,
but Retool should use the scoped token icon token.
Uploads are disabled unless TOKEN_ICON_CDN_UPLOADS_ENABLED=true. When enabled,
the runtime must also configure TOKEN_ICON_CDN_BUCKET_NAME,
TOKEN_ICON_CDN_PROJECT_ID, and TOKEN_ICON_CDN_BASE_URL; the API no longer
defaults upload storage to production targets.
POST /v1/admin/token-icons/preview
svg with raw SVG text or svgBase64 with base64
SVG text. Data URLs such as data:image/svg+xml;base64,... are also accepted.
cdnUrl is null when TOKEN_ICON_CDN_BASE_URL is not configured, so Retool
should rely on objectPath for previews in local/unconfigured environments.
Successful responses use the standard API envelope. In Retool, read the token
icon fields from data.*.
POST /v1/admin/token-icons/upload
allowOverwrite is true.
The default uploaded Cache-Control is public, max-age=300, must-revalidate.
If an existing symbol is overwritten, already-cached CDN/browser copies may
remain visible until the configured max age expires.
The upload response uses the same envelope as preview and adds
data.upload.*, including the final bucketName, objectPath, cdnUrl,
cacheControl, and overwritten flag.
1 MB50 KB100 KBforeignObject, animations, <style> elements, style attributes, external
references, data: references, non-fragment href/xlink:href/src
attributes, and XML entity/doctype declarations.