Authentication Required : These endpoints require ADMIN role for export, SUPERADMIN role for import.
Export Server Data
GET /api/server/export Export all server data including users, files, URLs, settings, and metrics.
Request
Exclude metrics from export (reduces file size significantly). Any value enables this option.
Return only entity counts instead of full export. Set to "true" to enable.
curl -X GET https://your-zipline.com/api/server/export \
-H "Authorization: YOUR_ADMIN_TOKEN" \
-o zipline_export.json
curl -X GET "https://your-zipline.com/api/server/export?nometrics=true" \
-H "Authorization: YOUR_ADMIN_TOKEN" \
-o zipline_export.json
curl -X GET "https://your-zipline.com/api/server/export?counts=true" \
-H "Authorization: YOUR_ADMIN_TOKEN"
Response (Counts Only)
When counts=true:
{
"users" : 12 ,
"files" : 1542 ,
"urls" : 89 ,
"folders" : 34 ,
"invites" : 8 ,
"thumbnails" : 1203 ,
"metrics" : 1440
}
Response (Full Export)
Returns a JSON file with the following structure:
Version information Export format version (currently "4")
Node.js version used to create export
Zipline version used to create export
Export request metadata ISO 8601 timestamp when export was created
Environment variables (sanitized)
ID and username of admin who created export
Operating system information (arch, platform, cpus, hostname, release)
Exported data Complete server settings (Zipline table)
All users (passwords hashed, tokens excluded)
User quota configurations
OAuth provider connections
User-created tags with file associations
Folder structure with file references
File metadata (does not include actual file data)
Metrics history (empty if nometrics parameter used)
The export includes metadata only . Actual file contents must be backed up separately from your datasource (S3 bucket, local storage, etc.).
Import Server Data
POST /api/server/import/v4 Import data from a Zipline v4 export file.
SUPERADMIN Only : This endpoint requires SUPERADMIN role.
Request
Complete Zipline v4 export object
Import configuration options Import server settings (currently unused, settings not imported)
mergeCurrentUser
string | null
default: "null"
User ID from export to merge with current user. Useful for importing your own data from another instance.
curl -X POST https://your-zipline.com/api/server/import/v4 \
-H "Authorization: YOUR_SUPERADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d @zipline_export.json
Import and merge with current user
curl -X POST https://your-zipline.com/api/server/import/v4 \
-H "Authorization: YOUR_SUPERADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"export4": { ... },
"config": {
"mergeCurrentUser": "clxxx123456789"
}
}'
Response
Count of successfully imported entities File metadata entries imported
{
"imported" : {
"users" : 8 ,
"oauthProviders" : 5 ,
"quotas" : 3 ,
"passkeys" : 12 ,
"folders" : 28 ,
"files" : 1204 ,
"tags" : 45 ,
"urls" : 67 ,
"invites" : 4 ,
"metrics" : 1440
}
}
Import Behavior
Conflict Handling
The import process skips entities that already exist:
Users : Skipped if username or ID already exists
OAuth Providers : Skipped if provider + oauthId combination exists
Quotas : Skipped if user already has a quota
Passkeys : Skipped if passkey name already exists for user
Folders : Skipped if folder name already exists for user
Files : Skipped if file name already exists
Tags : Skipped if tag name + user + createdAt combination exists
URLs : Skipped if code already exists for user
Invites : Skipped if invite code already exists for inviter
User Merging
When mergeCurrentUser is set:
Files, URLs, folders, and tags from the specified user ID are imported under your current user
User profile data (avatar, totpSecret, view settings) are merged
Useful for migrating your personal data between instances
Data Relationships
The import preserves relationships:
Folder parent-child hierarchies
File-folder associations
Tag-file associations
User ownership of all entities
Rate Limiting
This endpoint is rate-limited to 1 request per 5 seconds due to the intensive nature of imports.
Body Size Limit
Import endpoint accepts up to 24GB request body to support large exports.
Errors
403 Forbidden : Not a SUPERADMIN
400 Bad Request : Invalid export format
429 Too Many Requests : Rate limit exceeded
Import does not restore file contents. You must separately restore actual files to your datasource. The import only restores metadata that tells Zipline about those files.
Backup Strategy
For complete backups:
Export metadata : Use /api/server/export
Backup datasource : Copy files from S3 bucket or local storage directory
Backup database : Export PostgreSQL database
Store securely : Keep exports in multiple locations
To restore:
Restore database : Import PostgreSQL backup or use fresh database
Import metadata : Use /api/server/import/v4
Restore files : Copy files back to datasource
v4 : Current format (Zipline v3+)
v3 : Legacy format (deprecated)
Always use v4 for new exports. The v3 import endpoint exists for migration from older Zipline versions.