# Dashboard endpoints (Admin API)

> 3 FeatherPanel Admin API endpoints from admin/dashboard.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/dashboard/

Defined in [`backend/app/routes/admin/dashboard.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/dashboard.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/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/dashboard`

- Auth: Admin
- Permission: `admin.dashboard.view`
- Route name: `admin-dashboard`
- Controller: [`DashboardController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/DashboardController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/dashboard.php#L26)

**Get dashboard statistics** Retrieve comprehensive dashboard statistics including user counts, node counts, spell counts, server counts, and recent cron task status.

| Response `data` field | Type | Description |
| --- | --- | --- |
| `count` | object | System resource counts |
| `cron` | object | Cron task information |
| `changelog` | string\[\] | System changelog entries (currently empty) |
| `version` | object | Version information |

```bash
curl -X GET "$PANEL_URL/api/admin/dashboard" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Dashboard statistics retrieved successfully · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `500` Internal server error - Failed to fetch dashboard statistics

### PUT `/api/admin/dashboard/default-layout`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-dashboard-default-layout-update`
- Controller: [`DashboardDefaultLayoutController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Dashboard/DashboardDefaultLayoutController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/dashboard.php#L36)

**Save the panel default dashboard layout**

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `layout` | object | no |  |

```bash
curl -X PUT "$PANEL_URL/api/admin/dashboard/default-layout" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"layout":{}}'
```

Responses: `200` Saved · `400` Invalid layout

### DELETE `/api/admin/dashboard/default-layout`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-dashboard-default-layout-clear`
- Controller: [`DashboardDefaultLayoutController::clear`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Dashboard/DashboardDefaultLayoutController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/dashboard.php#L47)

**Remove the panel default dashboard layout**

```bash
curl -X DELETE "$PANEL_URL/api/admin/dashboard/default-layout" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Removed
