• General
  • My Apps
  • SDKs
  • Protocols
  • Structures
  • Methods
  • Errors
Log in Register Log out
  • General

  • My Apps

  • SDKs
    • C
    • Java
    • Javascript
    • Php
    • Swift

  • Protocols
    • HTTP JSON Protocol
      • Authentication
      • Single Connection
      • Uploading Files
    • Binary Protocol
      • Sending Binary Request
      • Sending Files
      • Receiving Binary Response
      • Receiving Files Data

  • Structures
    • Datetime
    • Event
    • File Descriptors
    • Filenames
    • Metadata
    • Share
    • Tree

  • Methods
    • Intro
      • Global Parameters
      • Authentication
    • General
      • getdigest
      • userinfo
      • supportedlanguages
      • setlanguage
      • feedback
      • currentserver
      • diff
      • getfilehistory
      • getip
      • getapiserver
    • Folder
      • createfolder
      • createfolderifnotexists
      • listfolder
      • renamefolder
      • deletefolder
      • deletefolderrecursive
      • copyfolder
    • File
      • uploadfile
      • uploadprogress
      • downloadfile
      • downloadfileasync
      • copyfile
      • checksumfile
      • deletefile
      • renamefile
      • stat
    • Auth
      • sendverificationemail
      • verifyemail
      • changepassword
      • lostpassword
      • resetpassword
      • register
      • invite
      • userinvites
      • logout
      • listtokens
      • deletetoken
      • sendchangemail
      • changemail
      • senddeactivatemail
      • deactivateuser
    • Streaming
      • getfilelink
      • getvideolink
      • getvideolinks
      • getaudiolink
      • gethlslink
      • gettextfile
    • Archiving
      • getzip
      • getziplink
      • savezip
      • extractarchive
      • extractarchiveprogress
      • savezipprogress
    • Sharing
      • sharefolder
      • listshares
      • sharerequestinfo
      • cancelsharerequest
      • acceptshare
      • declineshare
      • removeshare
      • changeshare
    • Public Links
      • getfilepublink
      • getfolderpublink
      • gettreepublink
      • showpublink
      • getpublinkdownload
      • copypubfile
      • listpublinks
      • listplshort
      • deletepublink
      • changepublink
      • getpubthumb
      • getpubthumblink
      • getpubthumbslinks
      • savepubthumb
      • getpubzip
      • getpubziplink
      • savepubzip
      • getpubvideolinks
      • getpubaudiolink
      • getpubtextfile
      • getcollectionpublink
    • Thumbnails
      • getthumblink
      • getthumbslinks
      • getthumb
      • savethumb
    • Upload Links
      • createuploadlink
      • listuploadlinks
      • deleteuploadlink
      • changeuploadlink
      • showuploadlink
      • uploadtolink
      • uploadlinkprogress
      • copytolink
    • Revisions
      • listrevisions
      • revertrevision
    • Fileops
      • file_open
      • file_write
      • file_pwrite
      • file_read
      • file_pread
      • file_pread_ifmod
      • file_checksum
      • file_size
      • file_truncate
      • file_seek
      • file_close
      • file_lock
    • Newsletter
      • newsletter_subscribe
      • newsletter_check
      • newsletter_verifyemail
      • newsletter_unsubscribe
      • newsletter_unsibscribemail
    • Trash
      • trash_list
      • trash_restorepath
      • trash_restore
      • trash_clear
    • Collection
      • collection_list
      • collection_details
      • collection_create
      • collection_rename
      • collection_delete
      • collection_linkfiles
      • collection_unlinkfiles
      • collection_move
    • OAuth 2.0
      • authorize
      • oauth2_token
    • Transfer
      • uploadtransfer
      • uploadtransferprogress

  • Errors

listfolder

Name

listfolder

Auth

yes

Description

Receive data for a folder.

Expects folderid or path parameter, returns folder's metadata. The metadata will have contents field that is array of metadatas of folder's contents.

Recursively listing the root folder is not an expensive operation.

URL

https://api.pcloud.com/listfolder

Required

ParameterDescription
pathstring path to the folder(discouraged)
folderidint id of the folder
Use path or folderid

Optional

ParameterDescription
recursiveint If is set full directory tree will be returned, which means that all directories will have contents filed.
showdeletedint If is set, deleted files and folders that can be undeleted will be displayed.
nofilesint If is set, only the folder (sub)structure will be returned.
nosharesint If is set, only user's own folders and files will be displayed.

Output

Returns folder's metadata. The metadata will have contents field that is array of metadatas of folder's contents.

Example

{
    result: 0,
    metadata: {
        icon: "folder",
        id: "d0",
        modified: "Thu, 19 Sep 2013 07:31:46 +0000",
        path: "/",
        thumb: false,
        created: "Thu, 19 Sep 2013 07:31:46 +0000",
        folderid: 0,
        isshared: false,
        isfolder: true,
        ismine: true,
        name: "/",
        contents: [
            {
                parentfolderid: 0,
                id: "d230807",
                modified: "Wed, 02 Oct 2013 13:23:35 +0000",
                path: "/Simple Folder",
                thumb: false,
                created: "Wed, 02 Oct 2013 13:11:53 +0000",
                folderid: 230807,
                ismine: true,
                isshared: false,
                isfolder: true,
                name: "Simple Folder",
                icon: "folder"
            }, {
                icon: "audio",
                contenttype: "audio/mpeg",
                parentfolderid: 0,
                modified: "Wed, 02 Oct 2013 13:23:19 +0000",
                path: "/Simple Audio.mp3",
                hash: 5380817599554757000,
                thumb: false,
                created: "Wed, 02 Oct 2013 13:23:19 +0000",
                id: "f1723778",
                ismine: true,
                category: 3,
                fileid: 1723778,
                isshared: false,
                isfolder: false,
                name: "Simple Audio.mp3",
                size: 11252576
            }]
    }
}

Errors

CodeDescription
1000Log in required.
1002No full path or folderid provided.
2000Log in failed.
2003Access denied. You do not have permissions to preform this operation.
2005Directory does not exist.
4000Too many login tries from this IP address.
5000Internal error. Try again later.
2014 © pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
© pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
Reset Password
Check your e-mail for further instructions.
Reset