GET
/get-/media
Retrieve Media Assets
Returns a paginated list of media assets stored in your FlowCMS workspace. Supports filtering by type, date, tags, and custom metadata. Ideal for building asset libraries, galleries, and dynamic content feeds.
Request Example
cURL
JavaScript
Python
curl -X GET "https://api.flowcms.io/v1/get-/media?limit=20&sort=-createdAt" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Pagination page number. Defaults to 1. |
| limit | integer | Optional | Number of items per page. Max 100. Defaults to 20. |
| sort | string | Optional | Sort field. Prefix with - for descending. E.g., -createdAt, name. |
| type | string | Optional | Filter by MIME type prefix. E.g., image, video, document. |
| tags | string | Optional | Comma-separated list of tags. E.g., hero,brand,2024. |
| fields | string | Optional | Comma-separated fields to include in response. Reduces payload size. |
Response
200 OK
application/json
{
"data": [
{
"id": "med_8f3a29c1b4",
"name": "hero-banner-final.png",
"url": "https://cdn.flowcms.io/v1/assets/med_8f3a29c1b4",
"type": "image/png",
"size": 1245830,
"dimensions": { "width": 1920, "height": 1080 },
"tags": ["hero", "marketing", "q3"],
"createdAt": "2025-03-12T14:22:00Z",
"updatedAt": "2025-03-12T14:22:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 142,
"totalPages": 8
}
}
Optimizing Payloads
Use the fields parameter to request only the properties you need. This significantly reduces bandwidth and improves response times for large asset libraries.
Visual Preview
This is how the API response typically renders in a frontend asset manager or gallery component:
๐ผ๏ธ
hero-banner-final.png
๐ฅ
product-demo-v2.mp4
๐
brand-guidelines.pdf
๐จ
icon-set-pack.svg
Notes & Limits
- Media URLs are signed by default if your workspace has security policies enabled. Tokens expire after 24 hours.
- Video assets over 500MB return a proxy URL that streams via our edge CDN.
- Rate limit: 120 requests/minute for this endpoint.
Path Syntax Note
The /get-/media route is a reserved internal alias for legacy compatibility. New integrations should use /v1/media or /v1/assets.