# Integrity endpoints (Admin API)

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

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

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

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

**Scan panel file integrity (SHA-256)** Hashes core backend PHP tree, public/index.php, and composer lockfiles. Optionally compares against storage/config/panel\_integrity\_baseline.json.

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

Responses: `200` Scan completed · `500` Scan failed

### POST `/api/admin/integrity/baseline`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-integrity-baseline`
- Controller: [`IntegrityController::saveBaseline`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/IntegrityController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/integrity.php#L36)

**Save current scan as integrity baseline** Writes storage/config/panel\_integrity\_baseline.json from the current file hashes.

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

Responses: `200` Baseline saved · `500` Failed to save
