Get your free beta license ↗
API operation · files group
POST

/files/{user}/extract

First published 3 Oct 20260.1.0Unchanged since publication

Extract an archive in a customer's home

Who may call it
AdministratorResellerCustomer
Token scope, any of
filesall
Answers200 OK

The operation uses the customer's permissions and the Linux distribution's unzip for .zip archives or tar for .tar, .tar.gz, and .tgz archives. By default, it extracts into the archive's parent directory and overwrites entries with matching names. To extract into a new directory, specify its path in into. That path must be unused.

If a .zip archive's uncompressed size exceeds the account's remaining disk space, the operation refuses it before extracting anything. For .tar, .tar.gz, and .tgz archives, extraction proceeds until it completes or the account runs out of disk space.

As a command

Run as root on the server

Parameters

userpath ·UsernameRequired
Username of the customer who owns the home directory. Administrators can specify any customer, and customers can specify only themselves.

Request body

JSON ·FileExtract· 2 fields
pathHomePathRequired
A path within the customer's home directory, with / representing the home directory itself. The path cannot contain .. components or control characters.
Path of a new directory to create for extraction, which must not already exist. If into is omitted, the archive is extracted into the directory that contains it.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/files/alice/extract" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "into": "text",
    "path": "public_html/index.php"
  }'
Response · 200 OK
{
  "into": "text",
  "path": "public_html/index.php",
  "tool": "text",
  "warnings": "text"
}

Errors

12 errors, each a status and a sentence
400--path is required
400--user is required
400<name> is an administrator: administrators have no home
400<what> climbs out of the home with ..
400<what> has a name over 255 characters
400<what> holds a control character
400<what> is required
400<what> is too long
400<what> must start with /, which is the home
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-files-user-extract/