Skip to main content

Get Folder Contents

list_folder

scope: files.metadata.read

Starts returning the contents of a folder. If the result's ListFolderResult.has_more field is true, call list_folder/continue with the returned ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.recursive set to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it but leave the children as they are. Check the new entry's FolderSharingInfo.read_only and set all its children's read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiple list_folder or list_folder/continue calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.

Basic Parameters

ParameterDescription
Include DeletedIf true, the results will include entries for files and folders that used to exist but were deleted. The default for this field is False.
PathA unique identifier for the file.
RecursiveIf true, the list folder operation will be applied recursively to all sub-folders and the response will contain contents of all sub-folders. The default for this field is False.

Advanced Parameters

ParameterDescription
Dropbox API Path Root-
Dropbox API Select Admin-
Dropbox API Select User-
Include Has Explicit Shared MembersIf true, the results will include a flag for each file indicating whether or not that file has any explicit members. The default for this field is False.
Include Media Info-
Include Mounted FoldersIf true, the results will include entries under mounted folders which includes app folder, shared folder and team folder. The default for this field is True.
Include Non Downloadable FilesIf true, include files that are not downloadable, i.e. Google Docs. The default for this field is True.

Example Output

{
"value": {
"cursor": "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu",
"entries": [
{
".tag": "file",
"client_modified": "2015-05-12T15:50:38Z",
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"file_lock_info": {
"created": "2015-05-12T15:50:38Z",
"is_lockholder": true,
"lockholder_name": "Imaginary User"
},
"has_explicit_shared_members": false,
"id": "id:a4ayc_80_OEAAAAAAAAAXw",
"is_downloadable": true,
"name": "Prime_Numbers.txt",
"path_display": "/Homework/math/Prime_Numbers.txt",
"path_lower": "/homework/math/prime_numbers.txt",
"property_groups": [
{
"fields": [
{
"name": "Security Policy",
"value": "Confidential"
}
],
"template_id": "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
}
],
"rev": "a1c10ce0dd78",
"server_modified": "2015-05-12T15:50:38Z",
"sharing_info": {
"modified_by": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
"parent_shared_folder_id": "84528192421",
"read_only": true
},
"size": 7212
},
{
".tag": "folder",
"id": "id:a4ayc_80_OEAAAAAAAAAXz",
"name": "math",
"path_display": "/Homework/math",
"path_lower": "/homework/math",
"property_groups": [
{
"fields": [
{
"name": "Security Policy",
"value": "Confidential"
}
],
"template_id": "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
}
],
"sharing_info": {
"no_access": false,
"parent_shared_folder_id": "84528192421",
"read_only": false,
"traverse_only": false
}
}
],
"has_more": false
}
}

Workflow Library Example

Get Folder Contents with Dropbox and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop