POST

Search Folders


Searches the Media Manager and returns a list of folders that match the terms specified in the parameters.

If no parameters are specified, the method returns all folders in the MEDIA_ROOT folder.

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 Events
Access Verticals by Automations
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/site-media/v1/folders/search

Body Params
rootFolderstring

A root folder in the Media Manager to search in.
Default: MEDIA_ROOT.


sortSort

Field name and order to sort by. One of:

  • displayName
  • updatedDate Default: updatedDate in desc order.

pagingPaging

Cursor and paging information.


searchstringmaxLength 200

Term to search for, such as the value of a folder's displayName.
For example, if a folder's displayName is 'my-videos-folder', the search term is 'my-videos-folder'.

Response Object
foldersArray <Folder>maxItems 200

Information about the folders in the requested folder.


nextCursorNextCursor

The next cursor if it exists.

Search folders
Request
cURL
curl -X POST \ 'https://www.wixapis.com/site-media/v1/folders/search' \ -H 'Authorization: <AUTH>' --data-binary '{ "rootFolder": "TRASH_ROOT", "sort": { "fieldName": "displayName", "order": "DESC" }, "paging": { "limit": 20 } }'
Response
JSON
{ "folders": [ { "id": "d147e1ab3e8b4114ad93d13bb9e23540", "displayName": "a deleted folder", "parentFolderId": "trash-root", "createdDate": "2022-08-30T16:56:29Z", "updatedDate": "2022-08-30T16:56:29Z", "state": "OK" }, { "id": "5bfba6861eed4f009c6abba0dc8b47db", "displayName": "Deleted Folder 2", "parentFolderId": "trash-root", "createdDate": "2022-04-17T15:37:02Z", "updatedDate": "2022-04-26T20:09:32Z", "state": "OK" } ], "nextCursor": { "cursors": { "next": "" }, "hasNext": false } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?