GET

List Folders


Retrieves a list of folders in the Media Manager. To retrieve a list of folders within a specific folder in the Media Manager, specify the specific folder's ID in the parentFolderId parameter. If no folder is specified, the method retrieves a list of folders within 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 Events
Access Verticals by Automations
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/site-media/v1/folders

Query Params
parentFolderIdstring

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


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
foldersArray <Folder>maxItems 200

Information about the folders in the requested folder.


nextCursorNextCursor

The next cursor if it exists.

List folders in a specific parent folder

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

Request
cURL
curl -X GET \ 'https://www.wixapis.com/site-media/v1/folders?parentFolderId=25284aa06584441ea94338fdcfbaba12&sort.fieldName=displayName&sort.order=DESC&paging.limit=2' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "folders": [ { "id": "d147e1ab3e8b4114ad93d13bb9e23540", "displayName": "misc", "parentFolderId": "25284aa06584441ea94338fdcfbaba12", "createdDate": "2022-08-30T16:56:29Z", "updatedDate": "2022-08-30T16:56:29Z", "state": "OK" }, { "id": "5bfba6861eed4f009c6abba0dc8b47db", "displayName": "images", "parentFolderId": "25284aa06584441ea94338fdcfbaba12", "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?