list_folder

POST https://api.dropboxapi.com/2/files/list_folder

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.

Request Body

{"path"=>"/Homework/math", "recursive"=>false, "include_media_info"=>false, "include_deleted"=>false, "include_has_explicit_shared_members"=>false, "include_mounted_folders"=>true, "include_non_downloadable_files"=>true}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Dropbox-API-Path-Rootstring
Dropbox-API-Select-Userstring
Dropbox-API-Select-Adminstring

RESPONSES

status: OK

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