GET

List Deleted Files


Retrieves a list of files in the Media Manager's trash bin.

Note: The Media Manager's trash bin (TRASH-ROOT folder) only contains temporarily deleted files, not permanently deleted files.

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/trash-bin/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's trash bin.


nextCursorNextCursor

The next cursor if it exists.

List files in the Media Manager's trash bin

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/trash-bin/files?sort.fieldName=updateDate&sort.order=DESC&paging.limit=2' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "files": [ { "id": "229acbb8_5af267716b0d449c8c706bfdbf51d9d0.mp3", "displayName": "01 - ES - Susanne Vega - Tom's Diner.mp3", "url": "https://music.wixstatic.com/mp3/229acbb8_5af267716b0d449c8c706bfdbf51d9d9.mp3", "parentFolderId": "trash-root", "hash": "24bbee7b0f95258fb72e6e672fdb9f75", "sizeInBytes": "5582258", "private": false, "mediaType": "AUDIO", "media": { "audio": { "id": "229acbb8_5af267716b0d449c8c706bfdbf51d9d9.mp3", "assets": [ { "id": "", "url": "https://music.wixstatic.com/mp3/229acbb8_5af267716b0d449c8c706bfdbf51d9d9.mp3", "urlExpirationDate": null, "sizeInBytes": null, "filename": null, "duration": 230164, "private": false, "assetKey": "320kbs.mp3", "format": "mp3", "quality": "320kbs" } ], "bitrate": 192000, "format": "mp3", "duration": 230164, "sizeInBytes": "5582258" } }, "operationStatus": "READY", "sourceUrl": null, "thumbnailUrl": "https://static.wixstatic.com/media/bed4c36100699ce1870dafd75a05210a.png", "labels": [], "createdDate": "2023-01-14T13:12:52Z", "updatedDate": "2023-01-14T13:12:52Z", "siteId": "bee66e94-91b6-4ff2-b0b8-236c95361026", "state": "OK", "internalTags": ["_fileOrigin_uploaded"] }, { "id": "4ab999246f267716b0d449c8c706bfdbf51d4060.mp3", "displayName": "04 - RS - Major Lazer - Lean On.mp3", "url": "https://music.wixstatic.com/mp3/5acbb8_5af267716b0d449c8c706bfdbf51d9d9.mp3", "parentFolderId": "trash-root", "hash": "24bbee7b0f95258fb72e6e672fdb9f75", "sizeInBytes": "5582258", "private": false, "mediaType": "AUDIO", "media": { "audio": { "id": "5ab999246f267716b0d449c8c706bfdbf51d4060.mp3", "assets": [ { "id": "", "url": "https://music.wixstatic.com/mp3/5ab999246f267716b0d449c8c706bfdbf51d4060.mp3", "urlExpirationDate": null, "sizeInBytes": null, "filename": null, "duration": 230164, "private": false, "assetKey": "320kbs.mp3", "format": "mp3", "quality": "320kbs" } ], "bitrate": 192000, "format": "mp3", "duration": 230164, "sizeInBytes": "5582258" } }, "operationStatus": "READY", "sourceUrl": null, "thumbnailUrl": "https://static.wixstatic.com/media/bed4c36100699ce1870dafd75a05210a.png", "labels": [], "createdDate": "2022-10-11T13:32:52Z", "updatedDate": "2022-10-11T13:32:52Z", "siteId": "bee66e94-91b6-4ff2-b0b8-236c95361026", "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?