Exporting Assets
If you need to use your assets programmatically (in a build script or CMS import), you can export your entire asset map.
Export from Dashboard
Navigate to the Visuals tab and click Export.
Export Formats
JSON (Gold Standard)
A nested dictionary of all visuals and their current URLs:
{
"dashboard": {
"hero": "https://cdn.poliage.com/v1/assets/proj_123/dashboard-hero",
"sidebar": "https://cdn.poliage.com/v1/assets/proj_123/dashboard-sidebar"
},
"login": {
"form": "https://cdn.poliage.com/v1/assets/proj_123/login-form",
"modal": "https://cdn.poliage.com/v1/assets/proj_123/login-modal"
}
}Perfect for importing into React apps or static site generators.
CSV
A flat list of keys and URLs:
key,url,variant,updated_at
dashboard-hero,https://cdn.poliage.com/...,default,2024-01-15
login-form,https://cdn.poliage.com/...,default,2024-01-15
login-form,https://cdn.poliage.com/...,dark,2024-01-15Designed for importing into CMS platforms like Contentful, Webflow, or WordPress.
TypeScript
Generate a type-safe definition file:
export const poliageAssets = {
dashboard: {
hero: "https://cdn.poliage.com/v1/assets/proj_123/dashboard-hero",
sidebar: "https://cdn.poliage.com/v1/assets/proj_123/dashboard-sidebar",
},
login: {
form: "https://cdn.poliage.com/v1/assets/proj_123/login-form",
},
} as const;
export type PoliageAssetKey = keyof typeof poliageAssets;CLI Export
Pull assets via the CLI:
poliage pull --format json > assets.json
poliage pull --format typescript > assets.tsAPI Access
Use the REST API:
GET https://api.poliage.com/v1/projects/:id/assets
Authorization: Bearer YOUR_API_KEYResponse:
{
"assets": [
{
"key": "dashboard-hero",
"url": "https://cdn.poliage.com/...",
"variant": "default",
"updatedAt": "2024-01-15T10:30:00Z"
}
]
}Use TypeScript exports for type-safe access to your assets in React applications.