Download Single File
Downloads a single file directly from ftpGrid storage.
The file path is provided as a URL query parameter.
The endpoint streams the file directly and returns the original content type when possible. Downloading files with REST API counts towards bandwidth usage.
Required Scope
file.read
or:
edge
Endpoint
POST /api/download/single?path=FULL_URL_ENCODED_PATH
Example Request (HTTPie)
http POST "https://webN.ftpgrid.com/api/download/single?path=/documents/my%20file.txt" \
Authorization:"Bearer YOUR_TOKEN"
Raw JSON Body
This endpoint does not use a request body.
The file path is supplied as a URL query parameter:
?path=/documents/my%20file.txt
Query Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Full file path, URL encoded |
Example Response
HTTP/1.1 200 OK
Content-Disposition: inline; filename="my file.txt"
Content-Type: text/plain
Example file content
Notes
- The file path must be URL encoded correctly
- The endpoint streams the file directly from storage
- The original content type is returned when detectable
- Large files are streamed and not fully buffered in memory
- The endpoint supports UTF-8 file names and paths
- Paths are UNIX-style paths
- Invalid or unsafe paths are rejected
- A
404response is returned if the file does not exist - Authorization is required for every download request
- The endpoint will return
inline