Description
Enables the user to compress and decompress resources i.e. files or directories.
URL
/ctrl/compress
Method
POST
URL Params
- action={comp|dcomp} Required
action=comp for compress and action=dcomp for decompress
See Common URL parameters
Data Params
- srcpath={compress/decompress path} File or directory to compress/decompress Required
- dstpath={destination path} path where the compressed/decompressed file shall be stored. Required
Environment variables such as $TEMP, $SYSTEM shall be possible to have in the path.
Success Response
- ACCEPTED(202)
- Location header: /progress/{id}
see HTTP Status codes
Example Response
No content
Error Response
BAD_REQUEST(400), See Robot controller return codes
Sample Call
curl --digest -u "Default User":robotics -d "srcpath=/fileservice/$system/Folder1&dstpath=/fileservice/$syspar/" -X POST "http://localhost/ctrl/compress?action=comp"
curl --digest -u "Default User":robotics -d "srcpath=/fileservice/$syspar/Folder1.rzo&dstpath=/fileservice/$syspar/" -X POST "http://localhost/ctrl/compress?action=dcomp"
Notes
- Compression of HOME folder, its sub directories, and SYSTEM folder is not allowed.
- While decompressing a compressed file or a folder to a destination path, if a file or a folder with the same name as the compressed file name is already existing, it will be overwritten by the contents of the decompressed file or folder.
- Since compression and decompression of resources are asynchronous tasks, the location header can be subscribed on to get information about the status of the tasks.
- Not supported in bootserver mode.