Skip to main content
Repositories are Restic backup storage locations. They can be stored locally, on cloud storage (S3, Azure, GCS), or via rclone-configured remotes.

List Repositories

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

Create Repository

curl -X POST http://localhost:4096/api/v1/repositories \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "S3 Backup Repository",
    "compressionMode": "auto",
    "config": {
      "type": "s3",
      "bucket": "my-backups",
      "endpoint": "s3.amazonaws.com",
      "region": "us-east-1",
      "accessKeyId": "ACCESS_KEY",
      "secretAccessKey": "SECRET_KEY"
    }
  }'
Create and initialize a new Restic repository. Request Body:
name
string
required
Repository name
compressionMode
string
Compression mode: “auto”, “max”, or “off”
config
object
required
Backend configuration object (varies by type)Local:
  • type: “local”
  • path: Local filesystem path
S3:
  • type: “s3”
  • bucket: Bucket name
  • endpoint: S3 endpoint
  • region: AWS region
  • accessKeyId: AWS access key ID
  • secretAccessKey: AWS secret access key
Azure:
  • type: “azure”
  • accountName: Azure storage account name
  • accountKey: Azure storage account key
  • container: Container name
GCS:
  • type: “gcs”
  • bucket: Bucket name
  • projectId: GCP project ID
  • credentials: Service account JSON credentials
Rclone:
  • type: “rclone”
  • remote: Rclone remote name (from rclone config)
  • path: Path within the remote
Response:
message
string
Success message
repository
object
Created repository basic info

Get Repository

curl -X GET http://localhost:4096/api/v1/repositories/{shortId} \
  -H "Cookie: zerobyte.session=..."
Get details for a specific repository. Parameters:
shortId
string
required
Repository short ID
Response: Returns the repository object (same structure as list response).

Get Repository Stats

curl -X GET http://localhost:4096/api/v1/repositories/{shortId}/stats \
  -H "Cookie: zerobyte.session=..."
Get storage and compression statistics for a repository. Parameters:
shortId
string
required
Repository short ID
Response:
total_size
number
Total repository size in bytes
total_file_count
number
Total number of files
compression_ratio
number
Compression ratio (1.0 = no compression)
snapshots_count
number
Number of snapshots

Update Repository

curl -X PATCH http://localhost:4096/api/v1/repositories/{shortId} \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Repository Name"
  }'
Update repository configuration. Parameters:
shortId
string
required
Repository short ID
Request Body:
name
string
New repository name
compressionMode
string
Updated compression mode
config
object
Updated backend configuration
Response: Returns the updated repository object.

Delete Repository

curl -X DELETE http://localhost:4096/api/v1/repositories/{shortId} \
  -H "Cookie: zerobyte.session=..."
Delete a repository and all its snapshots. Parameters:
shortId
string
required
Repository short ID
Response:
message
string
Success message

Unlock Repository

curl -X POST http://localhost:4096/api/v1/repositories/{shortId}/unlock \
  -H "Cookie: zerobyte.session=..."
Unlock a repository by removing stale locks. Parameters:
shortId
string
required
Repository short ID
Response:
success
boolean
Whether unlock succeeded
message
string
Result message

Start Doctor

curl -X POST http://localhost:4096/api/v1/repositories/{shortId}/doctor \
  -H "Cookie: zerobyte.session=..."
Start an asynchronous doctor operation to fix repository issues (unlock, check, repair index). Parameters:
shortId
string
required
Repository short ID
Response:
message
string
Status message
repositoryId
string
Repository ID

Cancel Doctor

curl -X DELETE http://localhost:4096/api/v1/repositories/{shortId}/doctor \
  -H "Cookie: zerobyte.session=..."
Cancel a running doctor operation. Parameters:
shortId
string
required
Repository short ID
Response:
message
string
Cancellation status message

List Rclone Remotes

curl -X GET http://localhost:4096/api/v1/repositories/rclone-remotes \
  -H "Cookie: zerobyte.session=..."
List all configured rclone remotes on the host system. Response:
remotes
array

Build docs developers (and LLMs) love