---
title: "Get a media library file and where it is used"
type: reference
method: GET
path: /rest-api/media-library/assets/{assetId}.do
tag: "Media Library"
---

# Get a media library file and where it is used

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

One file with every field the list returns, plus 'usages': the live creatives serving it, each with its campaign and advertiser, at most 'usageLimit' of them; 'usagesTotal' counts them all and 'usagesMore' says whether the list is cut. A user with shared advertisers sees only the usages of their advertisers. Requires the MEDIA_LIBRARY permission and view rights on campaigns.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `assetId` | integer | yes | `42` | Media library file id |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `usageLimit` | integer | no | `100` | Usages to list, at most 500 |

## Responses

- `200` — {success, asset:{...}, usagesTotal, usagesMore, usages:[{bannerId, bannerName, campaignId, campaignName, advertiserId, advertiserName}]}
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — The role lacks MEDIA_LIBRARY or campaign view rights
- `404` — No such file, it is deleted, or the user cannot see it

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/media-library/assets/42.do?usageLimit=100' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

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