Skip to main content
Volumes represent the data sources to back up. Zerobyte supports multiple backend types including NFS, SMB/CIFS, WebDAV, SFTP, and local directories.

List Volumes

curl -X GET http://localhost:4096/api/v1/volumes \
  -H "Cookie: zerobyte.session=..."
Retrieve all configured volumes. Response:
volumes
array

Create Volume

curl -X POST http://localhost:4096/api/v1/volumes \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My NFS Share",
    "config": {
      "type": "nfs",
      "host": "192.168.1.100",
      "path": "/mnt/backups",
      "version": "4"
    }
  }'
Create a new volume. Request Body:
name
string
required
Volume name
config
object
required
Backend configuration object (varies by type)NFS:
  • type: “nfs”
  • host: NFS server hostname or IP
  • path: Remote path
  • version: NFS version (“3” or “4”)
  • options: Additional mount options (optional)
SMB:
  • type: “smb”
  • host: SMB server hostname or IP
  • share: Share name
  • username: Username
  • password: Password
  • domain: Domain (optional)
WebDAV:
  • type: “webdav”
  • url: WebDAV URL
  • username: Username
  • password: Password
SFTP:
  • type: “sftp”
  • host: SFTP server hostname or IP
  • port: Port (default: 22)
  • username: Username
  • password: Password (or use privateKey)
  • privateKey: Private key path (optional)
Local:
  • type: “local”
  • path: Local filesystem path
Response: Returns the created volume object (same structure as list response).

Get Volume

curl -X GET http://localhost:4096/api/v1/volumes/{shortId} \
  -H "Cookie: zerobyte.session=..."
Get details for a specific volume including filesystem statistics. Parameters:
shortId
string
required
Volume short ID
Response:
volume
object
Volume object (same structure as list response)
statfs
object
Filesystem statistics

Update Volume

curl -X PUT http://localhost:4096/api/v1/volumes/{shortId} \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Volume Name",
    "autoRemount": true
  }'
Update volume configuration. Parameters:
shortId
string
required
Volume short ID
Request Body:
name
string
New volume name
autoRemount
boolean
Enable/disable auto-remount on failure
config
object
Updated backend configuration
Response: Returns the updated volume object.

Delete Volume

curl -X DELETE http://localhost:4096/api/v1/volumes/{shortId} \
  -H "Cookie: zerobyte.session=..."
Delete a volume. The volume will be unmounted first if necessary. Parameters:
shortId
string
required
Volume short ID
Response:
message
string
Success message

Mount Volume

curl -X POST http://localhost:4096/api/v1/volumes/{shortId}/mount \
  -H "Cookie: zerobyte.session=..."
Mount a volume to make it accessible. Parameters:
shortId
string
required
Volume short ID
Response:
status
string
Mount status: “mounted” or “error”
error
string | null
Error message if mount failed

Unmount Volume

curl -X POST http://localhost:4096/api/v1/volumes/{shortId}/unmount \
  -H "Cookie: zerobyte.session=..."
Unmount a volume. Parameters:
shortId
string
required
Volume short ID
Response:
status
string
Volume status after unmount
error
string | null
Error message if unmount failed

Health Check

curl -X POST http://localhost:4096/api/v1/volumes/{shortId}/health-check \
  -H "Cookie: zerobyte.session=..."
Perform a health check on a volume. Parameters:
shortId
string
required
Volume short ID
Response:
status
string
Health status: “mounted”, “unmounted”, or “error”
error
string | null
Error message if health check failed

Test Connection

curl -X POST http://localhost:4096/api/v1/volumes/test-connection \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "type": "nfs",
      "host": "192.168.1.100",
      "path": "/mnt/backups",
      "version": "4"
    }
  }'
Test a volume configuration before creating it. Request Body:
config
object
required
Volume configuration to test (same format as create)
Response:
success
boolean
Whether the connection test succeeded
message
string
Test result message

List Files

curl -X GET "http://localhost:4096/api/v1/volumes/{shortId}/files?path=/data&offset=0&limit=500" \
  -H "Cookie: zerobyte.session=..."
List files and directories in a volume path. Parameters:
shortId
string
required
Volume short ID
path
string
Directory path to list (default: root)
offset
integer
default:"0"
Pagination offset
limit
integer
default:"500"
Items per page (max: 1000)
Response:
files
array
List of file entries
path
string
Current directory path
offset
number
Current offset
limit
number
Current limit
total
number
Total number of entries
hasMore
boolean
Whether more entries are available

Browse Filesystem

curl -X GET "http://localhost:4096/api/v1/volumes/filesystem/browse?path=/mnt" \
  -H "Cookie: zerobyte.session=..."
Browse directories on the host filesystem (for configuring local volume paths). Parameters:
path
string
default:"/"
Directory path to browse
Response:
directories
array
List of directories
path
string
Current directory path

Build docs developers (and LLMs) love