v1

latestOpenAPI 3.0.02026-07-14198572488.4 KB
Files

Compress files or folders.

For a given site, compress a given files or folders.

post/v1/sites/{id}/files/compress

Path parameters

idinteger required

ID of the Site you are interacting with

Example:8880000888

Request body

sourcefilesstring[] required

Array of file names to include in the archive

destfilesstring required

name of the archive

compress_type'bz2' | 'gz' | 'tar' | 'tar.gz' | 'tar.bz2' | 'zip' required

Type of compression to use

Example request

{
  "sourcefiles": [
    "file1.html",
    "file2.jpg",
    "file3.css"
  ],
  "destfiles": "files.tar.gz",
  "compress_type": "tar.gz"
}

Response

OK

successboolean

whether the request succeeded

errorsstring[]
messagesstring[] nullable

Example response

{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "success": true,
    "path": "wp-content/plugins"
  }
}