• 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
    • Folder
      • createfolder
      • listfolder
      • renamefolder
      • deletefolder
      • deletefolderrecursive
    • File
      • uploadfile
      • uploadprogress
      • downloadfile
      • copyfile
      • checksumfile
      • deletefile
      • renamefile
    • 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

trash_list

Name

trash_list

Auth

yes

Description

Lists the contents of a folder in the Trash.

The root folder of the Trash has id='0'.

Outputs the metadata of the folder. This metadata will have contents field that is array of metadatas of folder's contents.

Note that the metadata from this function has the additional field origparentfolderid in the metadata. This is the folder, in which the file or folder was, before it was moved to Trash.

So the field parentfolderid is showing the position in the Trash.

Only files and folders that belong to the current user will be outputed from this method.

Recursively listing a Trash folder is not an expensive operation.

This method is very simillar to listfolder

URL

https://api.pcloud.com/trash_list

Optional

ParameterDescription
folderidint the id of the Trash folder. The default is 0 - the root of the Trash.
nofilesint If set, then no files will be included in the Trash list - only folders.
recursiveint If set, then the list will be recursive - the subfolders will have their folders and files included.

Output

On success returns the metadata and the contents of the folder from the Trash.

Example

{
    result: 0,
    metadata: {
        thumb: false,
        path: "/",
        isfolder: true,
        isshared: false,
        ismine: true,
        modified: "Mon, 16 Sep 2013 12:10:32 +0000",
        created: "Mon, 16 Sep 2013 12:10:32 +0000",
        name: "/",
        folderid: 0,
        isdeleted: true,
        icon: "folder",
        id: "d0",
        contents: [
            {
                name: "Deleted folder",
                folderid: 236427,
                id: "d236427",
                origparentfolderid: 123,
                parentfolderid: 0,
                thumb: false,
                isfolder: true,
                isshared: false,
                ismine: true,
                modified: "Sat, 14 Dec 2013 13:37:33 +0000",
                created: "Tue, 03 Dec 2013 15:50:22 +0000",
                isdeleted: true,
                icon: "folder",
                contents: [ ]
            },
            {
                name: "Deleted file",
                id: "f76543",
                fileid: 76543,
                origparentfolderid: 6543,
                parentfolderid: 0,
                category: 3,
                icon: "audio",
                contenttype: "audio/x-mpegurl",
                hash: 17079372075467340000,
                size: 759,
                isfolder: false,
                thumb: false,
                isshared: false,
                modified: "Wed, 18 Sep 2013 10:18:46 +0000",
                created: "Wed, 18 Sep 2013 10:18:14 +0000",
                ismine: true,
                isdeleted: true
            }
        ]
    }
}

Errors

CodeDescription
1000Log in required.
1017Invalid 'folderid' provided.
2000Log in failed.
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.
Log in to pCloud Account
Log in
Sign up
Login
Create a new account
Login
Sign up
Terms of Use
GET STARTED