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
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 field | Type | Required | Description |
|---|---|---|---|
command | string | yes | The command to execute |
cwd | string | no | Working directory for command execution |
Response data field | Type | Description |
|---|---|---|
stdout | string | Standard output from the command |
stderr | string | Standard error output from the command |
return_code | integer | Command exit code |
execution_time | number | Command execution time in milliseconds |
command | string | The executed command |
working_directory | string | Working directory where command was executed |
timestamp | string (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
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 field | Type | Description |
|---|---|---|
os | string | Operating system |
php_version | string | PHP version |
server_software | string | Web server software |
server_name | string | Server name |
user | string | Current user |
home | string | Home directory |
working_directory | string | Current working directory |
disk_usage | object | Disk usage information |
memory_usage | object | Memory usage information (Linux only) |
uptime | string | System 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