GET

List Files


Retrieves a list of files in the Media Manager.

To retrieve a list of files within a specific folder in the Media Manager, specify the folder's ID in the parentFolderId parameter. If no folder is specified, the method retrieves the list of files in the root folder of the Media Manager.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings Services and Settings
Manage Media Manager
Read Media Manager
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/site-media/v1/files

Query Params
parentFolderIdstring

ID of the file's parent folder.
Default:media-root.


mediaTypesArray <string>

File media type.


privateboolean

\ntrue: Returns only private files. \nfalse: Returns only public files. \nundefined: Returns public and private files. \n Learn more about private files (SDK | REST).


sort.fieldNamestringmaxLength 512

Name of the field to sort by.


sort.orderstring

Sort order.


paging.limitintegerminimum 0maximum 100format int32

Maximum number of items to return in the results.


paging.cursorstring

Pointer to the next or previous page in the list of results.

Pass the relevant cursor token from the pagingMetadata object in the previous call's response. Not relevant for the first request.

Response Object
filesArray <FileDescriptor>maxItems 200

List of files in the Media Manager.


nextCursorNextCursor

The next cursor if it exists.

List image files in a specific folder

This example sorts by updatedDate in DESC order with a paging limit of 2.

Request
cURL
curl -X GET \ 'https://www.wixapis.com/site-media/v1/files?parentFolderId=25284aa06584441ea94338fdcfbaba12&sort.fieldName=updateDate&mediaTypes=IMAGE&sort.order=DESC&paging.limit=2' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "files": [ { "createdDate": "2022-06-06T12:45:29.000Z", "displayName": "space.jpg", "hash": "df55f859485ab04453e6afacf259ac98", "id": "6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "labels": [ "Brown", "Spiral galaxy", "Atmosphere", "Nebula", "Milky way", "Galaxy", "Atmospheric phenomenon", "Astronomical object", "Science", "Star" ], "media": { "image": { "colors": { "palette": [ { "rgb": { "b": 28, "g": 28, "r": 25 } }, { "rgb": { "b": 156, "g": 163, "r": 163 } }, { "rgb": { "b": 111, "g": 111, "r": 107 } }, { "rgb": { "b": 152, "g": 150, "r": 136 } }, { "rgb": { "b": 90, "g": 87, "r": 73 } }, { "rgb": { "b": 149, "g": 138, "r": 124 } }, { "rgb": { "b": 85, "g": 74, "r": 66 } }, { "rgb": { "b": 46, "g": 63, "r": 160 } } ], "prominent": { "rgb": { "b": 31, "g": 30, "r": 26 } } }, "faces": [ { "confidence": 0.9979932308197021, "height": 64, "width": 46, "x": 50, "y": 5 } ], "image": { "filename": "space.jpg", "height": 4456, "id": "6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "sizeInBytes": "2608831", "url": "https://static.wixstatic.com/media/6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "width": 6031 }, "previewImage": { "height": 591, "id": "image.preview", "url": "https://static.wixstatic.com/media/6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "width": 800 } } }, "mediaType": "IMAGE", "operationStatus": "READY", "parentFolderId": "media-root", "private": true, "sizeInBytes": "2608831", "thumbnailUrl": "https://static.wixstatic.com/media/6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "updatedDate": "2022-06-06T12:45:29.000Z", "url": "https://static.wixstatic.com/media/6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg", "state": "OK", "url": "https://static.wixstatic.com/media/6acbb8_7a7bd9193ffc4130ab8ff74f5dcedf8a~mv2.jpg" }, { "createdDate": "2021-07-06T12:28:20.000Z", "displayName": "astronaut.jpg", "hash": "bf65f859485ab04453e6afacf259ac03", "id": "4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97~mv2.jpg", "labels": [ "Black", "Straight galaxy", "Air", "UFO", "Stars", "Universe", "Bold", "Human", "Science", "Saturn" ], "media": { "image": { "colors": { "palette": [ { "rgb": { "b": 28, "g": 28, "r": 25 } }, { "rgb": { "b": 156, "g": 163, "r": 163 } }, { "rgb": { "b": 222, "g": 111, "r": 17 } }, { "rgb": { "b": 12, "g": 150, "r": 16 } }, { "rgb": { "b": 9, "g": 7, "r": 73 } }, { "rgb": { "b": 149, "g": 18, "r": 122 } }, { "rgb": { "b": 25, "g": 74, "r": 66 } }, { "rgb": { "b": 46, "g": 23, "r": 10 } } ], "prominent": { "rgb": { "b": 31, "g": 10, "r": 26 } } }, "faces": [ { "confidence": 0.9979932308197021, "height": 64, "width": 6, "x": 50, "y": 5 } ], "image": { "filename": "astronaut.jpg", "height": 2956, "id": "4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97.jpg", "sizeInBytes": "2508841", "url": "https://static.wixstatic.com/media/4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97~mv2.jpg", "width": 3031 }, "previewImage": { "height": 201, "id": "image.preview", "url": "https://static.wixstatic.com/media/4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97~mv2.jpg", "width": 400 } } }, "mediaType": "IMAGE", "operationStatus": "READY", "parentFolderId": "media-root", "private": true, "sizeInBytes": "2508841", "thumbnailUrl": "https://static.wixstatic.com/media/4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97~mv2.jpg", "updatedDate": "2022-06-06T12:45:29.000Z", "url": "https://static.wixstatic.com/media/4b5bb8_7a7bd9193ffc4130ab8ff74f5dcedf97~mv2.jpg", "state": "OK" } ], "nextCursor": { "cursors": { "next": "" }, "hasNext": false } }
Errors
400Invalid Argument

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?