Skip to content

Media Library API

The Media Library contains the entities you upload through the Admin UI or the API, and that you can reference within your Contents.

Media Object

The Media data model:

json
{
  "id": "string",
  "code": "string",
  "folder": "string",
  "type": "image|video|document",
  "createdAt": "yyyy-MM-ddTHH:mm:ss.fff+HH:mm",
  "createdBy": "string",
  "modifiedAt": "yyyy-MM-ddTHH:mm:ss.fff+HH:mm",
  "modifiedBy": "string",
  "author": "string",
  "copyright": "string",
  "originalFileName": "string",
  "name": "string",
  "format": "string",
  "hash": "string",
  "mimeType": "string",
  "size": 0,
  "url": "string",
  "height": 0,
  "width": 0,
  "horizontalResolution": 0.0,
  "verticalResolution": 0.0,
  "duration": 0,
  "fps": 0,
  "codec": "string",
  "exif": {},
  "metadata": {}
}
PropertyDescription
idThe Entity ID
codeThe unique code for internal usage
folderThe path of the folder where the media is stored
typeimage, video, or document
urlThe full URL of the media
sizeThe size in bytes
height, widthDimensions in pixels (image, video)
duration, fps, codecVideo-specific properties
exifEXIF information from images

Folder Object

PropertyDescription
idThe Entity ID
textThe folder name
pathThe folder full path
childrenArray of folder objects

Query Parameters (List Media)

  • page: Page number (default: 1)
  • size: Items per page (default: 25)
  • filter: Filter parameters
  • sort: Sort field
  • folder: Folder path to filter by
  • searchInSubfolders: Include subfolders in search

WARNING

When you delete a folder the system deletes all sub-folders and files.

Atlas CMS Documentation