Storage

Download

Download files and list directories from Cludz Storage.
Storage Token is different from API Key. Get your Storage Token from Dashboard > Drive > Settings > Storage Token.

GET /storage/:uuid/:path

Download files or list directory contents.

List Directory

When the path points to a directory:

curl -X GET "https://storage.cludz.net/storage/{uuid}/documents/" \
  -H "Token: YOUR_STORAGE_TOKEN"

Response

{
  "statusCode": 200,
  "message": "Directory contents",
  "data": [
    {
      "name": "report.pdf",
      "size": 1048576,
      "isDirectory": false,
      "checksum": "abc123...",
      "created_at": "2025-01-01T00:00:00.000Z",
      "modified_at": "2025-01-01T00:00:00.000Z"
    },
    {
      "name": "images",
      "size": 0,
      "isDirectory": true,
      "checksum": "",
      "created_at": "2025-01-01T00:00:00.000Z",
      "modified_at": "2025-01-01T00:00:00.000Z",
      "sharingStatus": "public"
    }
  ]
}

File Object

FieldTypeDescription
namestringFile or folder name
sizenumberSize in bytes
isDirectorybooleanTrue if folder
checksumstringSHA-256 hash (files only)
created_atstringCreation timestamp
modified_atstringLast modified timestamp
sharingStatusstring"public", "shared", or null

Download File

When the path points to a file:

curl -X GET "https://storage.cludz.net/storage/{uuid}/documents/report.pdf" \
  -H "Token: YOUR_STORAGE_TOKEN" \
  -o report.pdf

The response includes appropriate headers:

HeaderDescription
Content-TypeMIME type of the file
Content-Dispositioninline or attachment
Content-LengthFile size in bytes
Cache-ControlCaching policy
Accept-Rangesbytes (range support)

Range Requests

For streaming large files, use the Range header:

curl -X GET "https://storage.cludz.net/storage/{uuid}/videos/movie.mp4" \
  -H "Token: YOUR_STORAGE_TOKEN" \
  -H "Range: bytes=0-1048575"

Response Headers (206 Partial Content)

Content-Range: bytes 0-1048575/10485760
Content-Length: 1048576

File Metadata

Get file information as JSON by adding ?detail=true:

curl -X GET "https://storage.cludz.net/storage/{uuid}/documents/report.pdf?detail=true" \
  -H "Token: YOUR_STORAGE_TOKEN"

Response

{
  "statusCode": 200,
  "message": "File info",
  "data": {
    "isDirectory": false,
    "name": "report.pdf",
    "path": "/documents/report.pdf",
    "size": 1048576,
    "hash": "abc123...",
    "mimeType": "application/pdf",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "modifiedAt": "2025-01-01T00:00:00.000Z"
  }
}

HEAD Request (Pre-upload Check)

Check file existence and hash before uploading:

curl -I "https://storage.cludz.net/storage/{uuid}/documents/report.pdf" \
  -H "Token: YOUR_STORAGE_TOKEN"

Response Headers

HeaderDescription
X-Is-Directory"true" or "false"
X-File-NameFile name
X-File-PathFull path
X-File-SizeSize in bytes
X-File-HashSHA-256 hash
X-File-MimeMIME type

Error Responses

StatusMessage
403No read permission
404Path not found
404Storage not found

Code Examples

const response = await fetch('https://storage.cludz.net/storage/{uuid}/documents/', {
  headers: { 'Token': 'YOUR_STORAGE_TOKEN' }
});
const { data: files } = await response.json();
Built with 💖 by Miza • © 2026 - Powered by Nuxt