Fetching assets
Prepr stores all your digital assets in the Media Library (in Prepr: the Media tab), making it easy to access, view, and manage your assets. You can add, edit, download, or delete files whenever needed; categorize, search, and filter assets on multiple attributes to find the right one quickly.
The Asset object
{
"id": "df7c1544-bad0-4c9d-928f-0c9f684c9ceb",
"created_on": "2023-06-13T14:35:54+00:00",
"changed_on": "2023-06-13T14:35:54+00:00",
"label": "Photo",
"name": "Sed et augue non mi dapibus tincidunt sollicitudin vel leo",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vel ornare massa. Ut vehicula commodo consequat.",
"author": "Marc van Dam",
"status": null,
"reference_id": "dam-249387",
"width": 1020,
"height": 1020,
"file_size": 228286, // File size in bytes. Value available for assets uploaded since 23 December 2025
"original_name": "sed-et-augue.jpg",
"mime_type": "image/jpeg",
"cdn_files": {
"total": 1,
"items": [
{
"id": "bfaac48b-fb0d-4d12-84da-af8d65244c4b",
"created_on": "2023-06-12T08:44:43+00:00",
"label": "CdnFile",
"file": "371apne44zy3.jpg",
"url": "https://example.stream.prepr.io/{format}/371apne44zy3-5az.jpg"
}
]
},
// Additional fields in the Asset model for the default locale
// Boolean field to mark an asset copyrighted
"copyrighted" : true,
"author_name": {
"body" : "John Captura", //An HTML text field for Author name
},
"price": 12.50, // Number field for price
// Additional fields in the Asset model for other locales
// Pass the localized param to get the fields for other locales
"localized" : {
"de-DE" : {
"copyrighted" : true
}
}
} | FIELD | DESCRIPTION |
|---|---|
| id | Unique identifier for each item. |
| created_on | UTC time at which the asset was created/upload. |
| changed_on | UTC time at which the asset was last updated. |
| label | Identifier for the object. |
| name | Name of the asset. |
| body | Description of the asset. |
| reference_id | Custom asset API ID. |
| author | Optional name of the author. |
| width | Width of the image of video. |
| height | Height of the image of video. |
| original_name | Name of the uploaded file. |
| mime_type | Mime type of the original file. |
| cdn_files | Object containing an array of items, the url field can be used for media playback. |
Query by ID
Since IDs are unique in Prepr, you can fetch the asset you want by its id.
The example below fetches one asset with the ID 535c1e-4d52-4794-9136-71e28f2ce4c1.
HTTPS request
GET https://cdn.prepr.io/assets/535c1e-4d52-4794-9136-71e28f2ce4c1
Authorization: Bearer <YOUR-ACCESS-TOKEN>Last updated on