• 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
    • 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
    • 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

extractarchive

Name

extractarchive

Auth

yes

Description

Extracts archive file from the user's filesystem.

Expects as paramters usual fileid or path of an archive file and tofolderid or topath for destination folder.

If the archive is password protected, password parameter should be provided, otherwise error number 7009 will be returned. Implementations should expect this error code and if encountered prompt user for password and retry the extraction process.

This method runs the extraction process for around 2 seconds. In case it manages to finish in these 2 seconds, finished will be set to true in the response. Otherwise finished will be false and progresshash will be provided. This value can be passed to extractarchiveprogress in order to continue the monitoring of the extraction process. In this case also information about current server is returned the same way as provided by currentserver. Monitoring extraction can only be done by sending requests to the same server as returned in the hostname.

Unless nooutput is set this method also returns output array of lines (with no newlines in the end) that are the output of the extraction program. The number returned in lines can be used to instruct extractarchiveprogress not to return the same lines of output again.

URL

https://api.pcloud.com/extractarchive

Optional

ParameterDescription
nooutputboolean if set extraction output is not returned
overwritestring specifies what to do if file to extract already exists in the folder, can be one of 'rename' (default), 'overwrite' and 'skip'
passwordstring password to use to extract a password protected archive

Output

Described above.

Example

{
  "progresshash": "KooPMKmcEBp",
  "ip": "204.155.151.23",
  "hostname": "api5.pcloud.com",
  "ipv6": "::1",
  "result": 0,
  "lines": 10,
  "ipbin": "204.155.151.45",
  "finished": false,
  "output": [
    "Titov.zip: Zip",
    "  Titov\/_ART5055.jpg  (1681557 B)... OK.",
    "  Titov\/_ART5059.jpg  (1713601 B)... OK.",
    "  Titov\/_ART5063.jpg  (1811854 B)... OK.",
    "  Titov\/_ART5069.jpg  (1918700 B)... OK.",
    "  Titov\/_ART5071.jpg  (1701381 B)... OK.",
    "  Titov\/_ART5074.jpg  (1678731 B)... OK.",
    "  Titov\/_ART5076.jpg  (1658403 B)... OK.",
    "  Titov\/_ART5079.jpg  (1728540 B)... OK.",
    "  Titov\/_ART5094.jpg  (1745843 B)... OK."
  ]
}

Errors

CodeDescription
1000Log in required.
1004No fileid or path provided.
1037Please provide at least one of 'topath', 'tofolderid' or 'toname'.
2000Log in failed.
2002A component of parent directory does not exist.
2003Access denied. You do not have permissions to preform this operation.
2005Directory does not exist.
2009File not found.
2010Invalid path.
2059Unsupported archive format.
3006Extracting of the archive failed.
4000Too many login tries from this IP address.
7009Archive is password protected, please supply 'password'.
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