Reset Password
Check your e-mail for further instructions.
Reset
Name
trash_restorepath
Auth
yes
Description
For a desired file or folder from the Trash, calculates where to restore.
This method is granted that will choose such the destination folder, that ismine is true.
If the parent folder is also deleted, then this method will calculate the path by going to the parent of the folder. That way the file or folder will be restored at most at the root of the file system.URL
https://api.pcloud.com/trash_restorepath
Required
Parameter | Description |
fileid | int file id of the file that would be restored |
folderid | int folder id of the folder that would be restored |
Output
On success returns the follwing metadatas
Field | Description |
metadata | Information how the file or folder will look after restoring |
destination | Information about the calculated destination of the restored foldre |
Example
{ result: 0, metadata: { name: "Deleted folder", id: "d56986", folderid: 56986, parentfolderid: 56980, isdeleted: true, ismine: true, icon: "folder", created: "Mon, 03 Feb 2014 15:02:56 +0000", modified: "Mon, 03 Feb 2014 15:03:13 +0000", isfolder: true, thumb: false, isshared: true }, destination: { name: "The destination folder", id: "d56980", folderid: 56980, parentfolderid: 0, ismine: true, icon: "folder", created: "Fri, 31 Jan 2014 12:57:56 +0000", modified: "Mon, 03 Feb 2014 15:04:32 +0000", isfolder: true, thumb: false, isshared: true } }
Code | Description |
1000 | Log in required. |
1017 | Invalid 'folderid' provided. |
1018 | Invalid 'fileid' provided. |
1053 | Please provide 'fileid' or 'folderid'. |
2000 | Log in failed. |
2005 | Directory does not exist. |
2009 | File not found. |
4000 | Too many login tries from this IP address. |
5000 | Internal error. Try again later. |