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.
You can only call this method when authenticated as a Wix app or Wix user identity.
A root folder in the Media Manager to search in.
Default: MEDIA_ROOT
.
Field name and order to sort by. One of:
displayName
updatedDate
Default: updatedDate
in desc
order.Cursor and paging information.
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'.
Information about the folders in the requested folder.
The next cursor if it exists.
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
}
}'
{
"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
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.