API operation · files group
POST
/files/{user}/extract
First published 3 Oct 2026
0.1.0Unchanged since publicationExtract an archive in a customer's home
Who may call it
AdministratorResellerCustomer
Token scope, any of
filesallAnswers200 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 serverParameters
userpath ·UsernameRequiredUsername of the customer who owns the home directory. Administrators can specify any customer, and customers can specify only themselves.
pathHomePathRequiredA path within the customer's home directory, with / representing the home directory itself. The path cannot contain .. components or control characters.
intoHomePathPath 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 sentence400--path is required400--user is required400<name> is an administrator: administrators have no home400<what> climbs out of the home with ..400<what> has a name over 255 characters400<what> holds a control character400<what> is required400<what> is too long400<what> must start with /, which is the home400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved401Authentication requiredNo error of this operation matches.
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/