---
title: "List media library files"
type: reference
method: GET
path: /rest-api/media-library/assets.do
tag: "Media Library"
---

# List media library files

`GET https://YOUR-NETWORK-DOMAIN/rest-api/media-library/assets.do`

The media library's files, newest first unless 'sort' says otherwise. 'available' is false when the network's file storage service is switched off; the library is empty then and uploads are refused. Filters: 'kind' (VIDEO, IMAGE, HTML5), 'query' (part of the name or file name), 'advertiserId' (the advertiser a file was uploaded for), 'width' and 'height' together (exact pixel size, as an image or HTML5 creative of that size needs). Each file carries 'usedIn', the number of live creatives serving it, and 'url', a link to view it. Pages: 'start' and 'limit' (at most 100); 'total' counts every match and 'more' says whether another page exists. Requires the MEDIA_LIBRARY permission and view rights on campaigns.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `kind` | string | no | `VIDEO` | VIDEO, IMAGE or HTML5 |
| `query` | string | no | `spring` | Part of the file's name or original file name |
| `advertiserId` | integer | no | `1001` | Only files uploaded for this advertiser |
| `width` | integer | no | `300` | Exact width in pixels; used together with height |
| `height` | integer | no | `250` | Exact height in pixels; used together with width |
| `start` | integer | no | `0` | Index of the first file to return |
| `limit` | integer | no | `25` | Files per page, at most 100 |
| `sort` | string | no | `CREATED` | CREATED, NAME or SIZE |
| `dir` | string | no | `DESC` | ASC or DESC |

## Responses

- `200` — {success, available, total, more, start, limit, assets:[{id, name, kind, advertiserId, advertiserName, fileName, contentType, fileSize, width, height, duration, video, url, usedIn, createdAt, createdBy}]}
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — The role lacks MEDIA_LIBRARY or campaign view rights

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/media-library/assets.do?advertiserId=1001&kind=VIDEO&query=spring&width=300' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/media-library/get-media-library-assets