searchFiles( )


Retrieves a list of up to 200 files with the specified filtering, sorting, and cursor paging.

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

Defaults

Search Files has the following default setting, which you can override:

  • Sorted by updatedDate in descending order.

Filters

When using filters for dates, you must use UTC time.

See also

To learn about working with Search methods, see API Query Language and Sorting and Paging.

Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Read Media Manager
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsSearchFilesOptions

Options to specify which folders to search.

Returns
Return Type:Promise<SearchFilesResponse>
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?