Skip to main content

List Folder Contents

Returns a listing of files and folders at the specified path.

Endpoint

GET https://mysite.files.com/v1.2/getResourceList

Replace mysite.files.com with your site address.

Request Parameters

NameData TypeDescription
access_tokenstringRequired. The session key that identifies which user is authenticated. Either an access token returned by the authenticateUser function, or a Files.com user API Key.
pathstringRequired. Path to list the contents of.
patternstringOnly include items whose name contains the supplied string.
offsetintegerUsed for paginating responses. Skip this number of results.
limitintegerUsed for paginating responses. Limit the total number of returned results.
sortBystringHow to sort the results.
Valid options: sort_files_name, sort_files_size, sort_files_date, or sort_files_type
sortOrderstringWhat direction to sort the results.
Valid options asc or desc

Pagination

The legacy ExaVault API does not include cursor-based pagination. Use the limit and offset request parameters to restrict the number of results returned, and make multiple requests to retrieve subsequent pages.

The limit parameter sets the maximum number of results returned, starting from the beginning of the list or from the offset value when provided. limit cannot exceed 10,000.

The offset parameter sets how many records to skip before returning up to limit results.

Sorting

Use the sortBy parameter to control the order of results. Valid options are sort_files_name, sort_files_size, sort_files_date, and sort_files_type. All sorting is case-insensitive.

The behavior of sort_files_date depends on your site's last-modified-date setting. When your site allows FTP, SFTP, WebDAV, and Web clients to set the modified date for a file manually, the sort uses that provided value — so a file recently updated in your site might not appear as recently modified. When your site does not allow clients to override the modified date, the sort uses the last time the file changed within the Files.com platform.

The sort_files_type option refers to each item's type: directory or file.

Sort order is ascending by default. To sort in descending order, set the sortOrder parameter to desc.