View .md

Console endpoints (Admin API)

2 FeatherPanel Admin API endpoints from admin/console.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/console.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

POST/api/admin/console/execute

Auth: AdminPermission: admin.rootRoute name: admin-console-executeController: ConsoleController::executeCommandroute source

Execute system command Execute a system command in the specified working directory. This endpoint is only available in developer mode and requires ADMIN_ROOT permissions.

Body fieldTypeRequiredDescription
commandstringyesThe command to execute
cwdstringnoWorking directory for command execution
Response data fieldTypeDescription
stdoutstringStandard output from the command
stderrstringStandard error output from the command
return_codeintegerCommand exit code
execution_timenumberCommand execution time in milliseconds
commandstringThe executed command
working_directorystringWorking directory where command was executed
timestampstring (date-time)Command execution timestamp
curl -X POST "$PANEL_URL/api/admin/console/execute" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"command":"","cwd":""}'

Plugin events: featherpanel:admin:console:command:executed

Responses: 200 Command executed successfully · 400 Bad request - No command provided · 401 Unauthorized · 403 Forbidden - Developer mode not enabled or insufficient permissions · 500 Internal server error - Command execution failed

GET/api/admin/console/system-info

Auth: AdminPermission: admin.rootRoute name: admin-console-system-infoController: ConsoleController::getSystemInforoute source

Get system information Retrieve detailed system information including OS, PHP version, disk usage, memory usage, and uptime. This endpoint is only available in developer mode and requires ADMIN_ROOT permissions.

Response data fieldTypeDescription
osstringOperating system
php_versionstringPHP version
server_softwarestringWeb server software
server_namestringServer name
userstringCurrent user
homestringHome directory
working_directorystringCurrent working directory
disk_usageobjectDisk usage information
memory_usageobjectMemory usage information (Linux only)
uptimestringSystem uptime
curl -X GET "$PANEL_URL/api/admin/console/system-info" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 System information retrieved successfully · 401 Unauthorized · 403 Forbidden - Developer mode not enabled or insufficient permissions · 500 Internal server error - Failed to fetch system info