# Storage Sense endpoints (Admin API)

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

Source: https://featherpanel.com/docs/api/reference/admin/storage-sense/

Defined in [`backend/app/routes/admin/storage-sense.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/storage-sense.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/storage-sense`

- Auth: Admin
- Permission: `admin.storage_sense.view`
- Route name: `admin-storage-sense-summary`
- Controller: [`StorageSenseController::summary`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/StorageSenseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/storage-sense.php#L25)

**Storage Sense summary** Row counts and how many rows would be removed for a retention period.

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

Responses: `200` OK · `400` Bad request

### POST `/api/admin/storage-sense/purge`

- Auth: Admin
- Permission: `admin.storage_sense.manage`
- Route name: `admin-storage-sense-purge`
- Controller: [`StorageSenseController::purge`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/StorageSenseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/storage-sense.php#L36)

**Purge old rows**

```bash
curl -X POST "$PANEL_URL/api/admin/storage-sense/purge" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK · `400` Bad request

### POST `/api/admin/storage-sense/purge-batch`

- Auth: Admin
- Permission: `admin.storage_sense.manage`
- Route name: `admin-storage-sense-purge-batch`
- Controller: [`StorageSenseController::purgeBatch`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/StorageSenseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/storage-sense.php#L47)

**Purge multiple targets**

```bash
curl -X POST "$PANEL_URL/api/admin/storage-sense/purge-batch" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK · `400` Bad request
