View .md

Databases Management endpoints (Admin API)

5 FeatherPanel Admin API endpoints from admin/databases-management.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/databases-management.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/databases/management/status

Auth: AdminPermission: admin.databases.viewRoute name: admin-databases-management-statusController: DatabaseManagmentController::statusroute source

Get database status Retrieve comprehensive database status information including MySQL version, uptime, connection statistics, and performance metrics.

Response data fieldTypeDescription
enginestringDatabase engine type
versionstringMySQL version
uptime_secondsintegerDatabase uptime in seconds
threads_connectedintegerNumber of currently connected threads
threads_runningintegerNumber of currently running threads
connections_totalintegerTotal number of connections made
aborted_connectsintegerNumber of aborted connection attempts
queries_totalintegerTotal number of queries executed
questions_totalintegerTotal number of questions (statements) executed
qpsnumberQueries per second (calculated)
bytes_receivedintegerTotal bytes received from clients
bytes_sentintegerTotal bytes sent to clients
curl -X GET "$PANEL_URL/api/admin/databases/management/status" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Database status retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 500 Internal server error - Failed to fetch database status

POST/api/admin/databases/management/migrate

Auth: AdminPermission: admin.databases.manageRoute name: admin-databases-management-migrateController: DatabaseManagmentController::migrateroute source

Run database migrations Execute pending database migrations from the storage/migrations directory. This will run all SQL migration files that haven't been executed yet.

Response data fieldTypeDescription
exit_codeintegerExit code (0 for success, 1 for errors)
outputstringMigration execution log with detailed output
curl -X POST "$PANEL_URL/api/admin/databases/management/migrate" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:database_management:migrations:executed

Responses: 200 Migrations executed successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 500 Internal server error - Failed to run migrations

POST/api/admin/databases/management/install-phpmyadmin

Auth: AdminPermission: admin.databases.manageRoute name: admin-databases-management-install-phpmyadminController: DatabaseManagmentController::installPhpMyAdminroute source

Install phpMyAdmin Download and install phpMyAdmin to the public directory. This will download the latest version, extract it, configure it, and install themes.

Response data fieldTypeDescription
messagestringSuccess message
already_installedbooleanWhether phpMyAdmin was already installed
curl -X POST "$PANEL_URL/api/admin/databases/management/install-phpmyadmin" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 phpMyAdmin installed successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 500 Internal server error - Failed to install phpMyAdmin

GET/api/admin/databases/management/phpmyadmin/status

Auth: AdminPermission: admin.databases.viewRoute name: admin-databases-management-phpmyadmin-statusController: DatabaseManagmentController::checkPhpMyAdminStatusroute source

Check phpMyAdmin installation status Check if phpMyAdmin is currently installed.

Response data fieldTypeDescription
installedbooleanWhether phpMyAdmin is installed
curl -X GET "$PANEL_URL/api/admin/databases/management/phpmyadmin/status" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 phpMyAdmin installation status retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions

DELETE/api/admin/databases/management/phpmyadmin

Auth: AdminPermission: admin.databases.manageRoute name: admin-databases-management-delete-phpmyadminController: DatabaseManagmentController::deletePhpMyAdminroute source

Delete phpMyAdmin Remove phpMyAdmin installation from the public directory.

Response data fieldTypeDescription
messagestringSuccess message
curl -X DELETE "$PANEL_URL/api/admin/databases/management/phpmyadmin" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 phpMyAdmin deleted successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 404 phpMyAdmin is not installed · 500 Internal server error - Failed to delete phpMyAdmin