📁 Content Library
List media assets
Changed onRetrieve a paginated list of media assets for a workspace with filtering, search, and sort options.
get/api/v1/workspaces/{workspace_id}/media
Request
- Base URLhttps://api.contentstudio.io
- URLhttps://api.contentstudio.io/api/v1/workspaces/{workspace_id}/media
- AuthAPI key in header X-API-Key
Path parameters
workspace_idstring required
Example:610a1e660cb41530ca40d372
Workspace ID
Query parameters
pageinteger
Example:1
Page number for pagination
per_pageinteger
Example:20
Number of items per page (max: 100)
type'images' | 'videos'
Example:images
Filter by media type
searchstring
Example:banner
Search media by name (case-insensitive partial match)
sort'recent' | 'oldest' | 'size' | 'a2z' | 'z2a'
Sort order
archivedboolean
Set true to list archived media instead of active media. Defaults to false.
folder_idstring
Example:625d06734ceb636c2f5e7799
Restrict the listing to one folder. Must belong to this workspace (or its shared tree) — any other id returns 404 FOLDER_NOT_FOUND.
Response
Media retrieved successfully
Example response
{
"status": true,
"message": "Media retrieved successfully.",
"current_page": 1,
"per_page": 20,
"total": 150,
"last_page": 8,
"from": 1,
"to": 20,
"data": [
{
"id": "625d06734ceb636c2f5e7743",
"_id": "625d06734ceb636c2f5e7743",
"name": "banner.jpg",
"url": "https://storage.googleapis.com/.../banner.jpg",
"mime_type": "image/jpeg",
"extension": "jpg",
"size": 245760,
"type": "image",
"dimensions": {
"width": 1920,
"height": 1080
}
}
]
}Changes
- info
added the non-success response with the status
- info
- info
added the optional property
//to the response with the status
- info