Filesystem Methods
HTTP Endpoints
- POST /filesystems
Creates a new filesystem
- Request Headers:
Authorization – API key or Bearer token for user authentication
- Status Codes:
200 OK – Success. Returns the initialization information if it’s an initialization request.
400 Bad Request – Bad request.
409 Conflict – Filesystem already exists and was not created.
500 Internal Server Error – Unknown error.
Response Syntax:
{ "name": "string" }
- Raises:
May raise exceptions related to database operations or service availability.
- GET /filesystems
Lists all available filesystems
- Request Headers:
Authorization – API key or Bearer token for user authentication
- Status Codes:
200 OK – Success. Returns the initialization information if it’s an initialization request.
500 Internal Server Error – Unknown error.
Response Syntax:
[ { "name": "string", "filesystemId": "string", "ownership": "owned" | "shared" } ]
- Raises:
May raise exceptions related to database operations or service availability.
- DELETE /filesystems/(filesystem_id)
- GET /filesystems/(filesystem_id)
Fetches the name of the filesystem
- Request Headers:
Authorization – API key or Bearer token for user authentication
- Status Codes:
200 OK – Success. Returns the initialization information if it’s an initialization request.
500 Internal Server Error – Unknown error occurred during processing.
Response Syntax:
{ "name": "string" }
- Raises:
May raise exceptions related to database operations or service availability.
- DELETE /filesystems/(filesystem_id)/files/(path: filepath)
- GET /filesystems/(filesystem_id)/files/(path: filepath)
Download a chunk of a file.
- Request Headers:
Authorization – API key or Bearer token for user authentication
Content-Range – Byte range for this file, in the format <START>-<END>
- Status Codes:
200 OK – Success.
403 Forbidden – Requested file path forbidden.
400 Bad Request – Invalid Content-Range header.
500 Internal Server Error – Unknown error occurred during processing.
Pass the query string param ?init=true to obtain the file size and a download_id
- Raises:
May raise exceptions related to database operations or service availability.
- POST /filesystems/(filesystem_id)/files/(path: filepath)
Initialize or complete a multipart upload. Initializations include the size in the request body. Completions include the upload ID and a boolean true/false string in the body.
- Request Headers:
Authorization – API key or Bearer token for user authentication
- Status Codes:
200 OK – Success. Returns the initialization information if it’s an initialization request.
403 Forbidden – Requested file path forbidden.
400 Bad Request – Invalid request body.
500 Internal Server Error – Unknown error occurred during processing.
Request Syntax (Initialize):
{ "size": 123 }
Request Syntax (Complete):
{ "complete": "true" | "false" "uploadId": "string" }
Response Syntax (Initialize):
[ { "uploadId": "string" } ]
- Raises:
May raise exceptions related to database operations or service availability.
- PUT /filesystems/(filesystem_id)/files/(path: filepath)
Upload a chunk of a file.
- Request Headers:
Authorization – API key or Bearer token for user authentication
Content-Range – Upload ID and byte range for this file, in the format [<UPLOAD_ID>]:<START>-<END>
- Status Codes:
200 OK – Success.
403 Forbidden – Requested file path forbidden.
400 Bad Request – Invalid Content-Range header.
402 Payment Required – Content-Range doesn’t match length of body.
500 Internal Server Error – Unknown error occurred during processing.
- Raises:
May raise exceptions related to database operations or service availability.
- GET /filesystems/(filesystem_id)/list/(path: filepath)
- GET /filesystems/(filesystem_id)/list
- POST /filesystems/(filesystem_id)/mkdir/(path: filepath)