Endpoint
Authentication
Requires Bearer token authentication via theAuthorization header.
Path Parameters
The UUID of the server
Request Body
The directory where the archive is located (files will be extracted relative to this)
The archive file to decompress (relative to root)
Response
Returns204 No Content on success.
Example Request
Supported Archive Formats
Wings supports automatic format detection and extraction of:.tar.gz,.tgz- Gzip-compressed tar archives.tar- Uncompressed tar archives.zip- ZIP archives.rar- RAR archives.7z- 7-Zip archives.tar.bz2,.tbz2- Bzip2-compressed tar archives.tar.xz,.txz- XZ-compressed tar archives.tar.lz- Lzip-compressed tar archives
Behavior
- Archive format is automatically detected by file extension
- Files are extracted to the same directory as the archive
- Existing files with the same name are overwritten
- Directory structure within the archive is preserved
- File permissions and timestamps are preserved
- Archive file is automatically deleted after successful extraction
- Path traversal is prevented (archives cannot extract outside server directory)
Error Responses
400 Bad Request
400 Bad Request
Unsupported archive format
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
Server or archive file does not exist
500 Internal Server Error
500 Internal Server Error
Failed to extract archive (corrupted archive, disk full, permission error, etc.)
Use Cases
- Restore world backups
- Install plugin packs
- Extract uploaded archives
- Restore server snapshots
- Deploy pre-packaged configurations
Source Reference
Implementation:router/router_server_files.go (postServerDecompressFiles function)