Database Snapshots endpoints (Admin API)
7 FeatherPanel Admin API endpoints from admin/database-snapshots.php: methods, paths, auth, permissions, rate limits, parameters and responses.
Last synced from FeatherPanel 15b94e9 on .
On this page
Defined in backend/app/routes/admin/database-snapshots.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.
Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.
Endpoints
GET/api/admin/database-snapshots
List all database snapshots Retrieve a list of all available database snapshots with metadata.
Response data field | Type | Description |
|---|---|---|
snapshots | object[] |
curl -X GET "$PANEL_URL/api/admin/database-snapshots" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Snapshots retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
POST/api/admin/database-snapshots
Create a new database snapshot Create a complete SQL dump of the entire database and save it as a FeatherPanel Backup (.fpb) file.
| Body field | Type | Required | Description |
|---|---|---|---|
password | string | yes | Current user password for security verification |
Response data field | Type | Description |
|---|---|---|
filename | string | |
size | integer | File size in bytes |
size_formatted | string |
curl -X POST "$PANEL_URL/api/admin/database-snapshots" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"password":""}'Plugin events: featherpanel:database:snapshot:created
Responses: 200 Snapshot created successfully · 400 Bad request - Missing password · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 500 Internal server error - Failed to create snapshot
GET/api/admin/database-snapshots/{filename}/download
Download a database snapshot Download a specific database snapshot file. Password verification required.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
filename | path | string | yes | The filename of the snapshot to download |
password | query | string | yes | Current user password for security verification |
curl -X GET "$PANEL_URL/api/admin/database-snapshots/$FILENAME/download?password=$PASSWORD" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Plugin events: featherpanel:database:snapshot:downloaded
Responses: 200 Snapshot file downloaded · 400 Bad request - Missing password or invalid snapshot · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 404 Snapshot not found
POST/api/admin/database-snapshots/{filename}/restore
Restore database from snapshot Wipe the current database and restore it from a snapshot file. WARNING: This will delete all current data!
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
filename | path | string | yes | The filename of the snapshot to restore |
| Body field | Type | Required | Description |
|---|---|---|---|
confirm | boolean | yes | Must be true to confirm restoration |
password | string | yes | Current user password for security verification |
Response data field | Type | Description |
|---|---|---|
message | string |
curl -X POST "$PANEL_URL/api/admin/database-snapshots/$FILENAME/restore" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"confirm":false,"password":""}'Plugin events: featherpanel:database:snapshot:restored
Responses: 200 Database restored successfully · 400 Bad request - Missing confirmation, password, or invalid snapshot · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 404 Snapshot not found · 500 Internal server error - Failed to restore database
POST/api/admin/database-snapshots/restore-upload
Restore database from uploaded snapshot file Upload and restore a FeatherPanel Backup (.fpb) file. WARNING: This will wipe all tables and delete all current data!
| Body field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | yes | FeatherPanel Backup (.fpb) file to restore |
confirm | boolean | yes | Must be true to confirm restoration |
password | string | yes | Current user password for security verification |
Response data field | Type | Description |
|---|---|---|
message | string |
curl -X POST "$PANEL_URL/api/admin/database-snapshots/restore-upload" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json" \
-F "file=@./file" \
-F "confirm=" \
-F "password="Responses: 200 Database restored successfully · 400 Bad request - Missing confirmation, password, or invalid file · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 500 Internal server error - Failed to restore database
DELETE/api/admin/database-snapshots/{filename}
Delete a database snapshot Delete a specific database snapshot file.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
filename | path | string | yes | The filename of the snapshot to delete |
| Body field | Type | Required | Description |
|---|---|---|---|
password | string | yes | Current user password for security verification |
Response data field | Type | Description |
|---|---|---|
message | string |
curl -X DELETE "$PANEL_URL/api/admin/database-snapshots/$FILENAME" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"password":""}'Plugin events: featherpanel:database:snapshot:deleted
Responses: 200 Snapshot deleted successfully · 400 Bad request - Missing password or invalid snapshot · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 404 Snapshot not found · 500 Internal server error - Failed to delete snapshot
POST/api/admin/database-snapshots/fresh-restore
Restore database to fresh state Wipe the entire database clean, run migrations, and recreate the current user with the same session token. WARNING: This will delete ALL data including users, servers, and all other records!
| Body field | Type | Required | Description |
|---|---|---|---|
confirm | boolean | yes | Must be true to confirm fresh restore |
password | string | yes | Current user password for security verification |
Response data field | Type | Description |
|---|---|---|
message | string |
curl -X POST "$PANEL_URL/api/admin/database-snapshots/fresh-restore" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"confirm":false,"password":""}'Responses: 200 Database restored to fresh state successfully · 400 Bad request - Missing confirmation or password · 401 Unauthorized - Invalid password or not authenticated · 403 Forbidden - Insufficient permissions or developer mode not enabled · 500 Internal server error - Failed to restore database