/files/{user}/download
0.2.0Unchanged since publicationDownload a file or download a directory as a ZIP archive
filesreadallUrbeStack streams downloads without a size limit, without buffering the full download in memory, and without saving a copy on the server. If a failure occurs after streaming begins, the response ends early without an error message.
A file is returned as application/octet-stream with Content-Length. To resume a file download, send Range: bytes=N-. The offset N can contain up to 18 decimal digits. A partial response returns 206 with Content-Range. A zero offset or an unsupported Range format yields the full file with status 200.
A directory is returned as a streamed application/zip archive with status 200. The response omits Content-Length and ignores Range. The archive excludes symbolic links and excludes Trash when downloading the home directory. To create an archive that preserves symbolic links, use POST /files/{user}/compress.
The server allows two concurrent downloads in total and one per account. A request that exceeds either limit returns 429.
Parameters
Example
See the API overview for how to set $API and $TOKEN.curl -sS -X GET "$API/files/alice/download?path=public_html/index.php" \ -H "Authorization: Bearer $TOKEN"
200 OKErrors
12 errors, each a status and a sentence400<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> may hold at most 1000 paths400<what> must be a list of at least one path400<what> must start with /, which is the home400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved401Authentication requiredurbestack.com/docs/api/get-files-user-download/