# FeatherZeroTrust endpoints (Admin API)

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

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

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

- Auth: Admin
- Permission: `admin.featherzerotrust.configure`
- Route name: `admin-featherzerotrust-config`
- Controller: [`FeatherZeroTrustController::getConfig`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L27)

**Get FeatherZeroTrust configuration** Retrieve current FeatherZeroTrust configuration.

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

Plugin events: [`featherpanel:admin:featherzerotrust:config:retrieved`](https://featherpanel.com/docs/plugins/events/feather-zero-trust/#feather-zero-trust-config-retrieved)

Responses: `200` Configuration retrieved successfully

### PUT `/api/admin/featherzerotrust/config`

- Auth: Admin
- Permission: `admin.featherzerotrust.configure`
- Route name: `admin-featherzerotrust-config-update`
- Controller: [`FeatherZeroTrustController::updateConfig`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L38)

**Update FeatherZeroTrust configuration** Update FeatherZeroTrust configuration settings.

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

Plugin events: [`featherpanel:admin:featherzerotrust:config:updated`](https://featherpanel.com/docs/plugins/events/feather-zero-trust/#feather-zero-trust-config-updated)

Responses: `200` Configuration updated successfully

### POST `/api/admin/featherzerotrust/scan`

- Auth: Admin
- Permission: `admin.featherzerotrust.scan`
- Route name: `admin-featherzerotrust-scan`
- Controller: [`FeatherZeroTrustController::scanServer`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L50)

**Scan a server** Scan a server for suspicious files using FeatherZeroTrust.

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

Plugin events: [`featherpanel:admin:featherzerotrust:scan:completed`](https://featherpanel.com/docs/plugins/events/feather-zero-trust/#feather-zero-trust-scan-completed), [`featherpanel:admin:featherzerotrust:scan:started`](https://featherpanel.com/docs/plugins/events/feather-zero-trust/#feather-zero-trust-scan-started)

Responses: `200` Server scan completed successfully

### POST `/api/admin/featherzerotrust/scan/batch`

- Auth: Admin
- Permission: `admin.featherzerotrust.scan`
- Route name: `admin-featherzerotrust-scan-batch`
- Controller: [`FeatherZeroTrustController::scanBatch`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L62)

**Scan multiple servers** Scan multiple servers for suspicious files using FeatherZeroTrust.

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

Responses: `200` Batch scan completed

### GET `/api/admin/featherzerotrust/logs`

- Auth: Admin
- Permission: `admin.featherzerotrust.view`
- Route name: `admin-featherzerotrust-logs`
- Controller: [`FeatherZeroTrustController::getCronLogs`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L74)

**Get FeatherZeroTrust cron execution logs** Retrieve cron job execution logs with pagination.

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

Responses: `200` Cron logs retrieved successfully

### GET `/api/admin/featherzerotrust/logs/{executionId}`

- Auth: Admin
- Permission: `admin.featherzerotrust.view`
- Route name: `admin-featherzerotrust-logs-details`
- Controller: [`FeatherZeroTrustController::getCronLogDetails`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L85)

**Get detailed cron execution log** Retrieve detailed information about a specific cron execution including server scan logs.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `executionId` | path | \- | yes |  |

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

Responses: `200` Execution log retrieved successfully

### GET `/api/admin/featherzerotrust/hashes`

- Auth: Admin
- Permission: `admin.featherzerotrust.view`
- Route name: `admin-featherzerotrust-hashes`
- Controller: [`FeatherZeroTrustController::getHashes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L101)

**Get suspicious file hashes** Retrieve suspicious file hashes from the database.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `confirmed_only` | query | boolean | no | Only return confirmed malicious hashes |

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

Responses: `200` Hashes retrieved successfully

### GET `/api/admin/featherzerotrust/hashes/stats`

- Auth: Admin
- Permission: `admin.featherzerotrust.view`
- Route name: `admin-featherzerotrust-hashes-stats`
- Controller: [`FeatherZeroTrustController::getHashStats`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L112)

**Get hash statistics** Retrieve statistics about suspicious file hashes in the database.

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

Responses: `200` Hash statistics retrieved successfully

### POST `/api/admin/featherzerotrust/hashes/check`

- Auth: Admin
- Permission: `admin.featherzerotrust.view`
- Route name: `admin-featherzerotrust-hashes-check`
- Controller: [`FeatherZeroTrustController::checkHashes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L123)

**Check hashes against database** Check multiple hashes against the suspicious file hash database.

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

Responses: `200` Hashes checked successfully

### POST `/api/admin/featherzerotrust/hashes`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-add`
- Controller: [`FeatherZeroTrustController::addHash`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L135)

**Add hash manually** Manually add a suspicious file hash to the database.

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

Responses: `200` Hash added successfully

### PUT `/api/admin/featherzerotrust/hashes/{hash}/confirm`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-confirm`
- Controller: [`FeatherZeroTrustController::confirmHash`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L147)

**Confirm hash as malicious** Mark a hash as confirmed malicious.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | path | \- | yes |  |

```bash
curl -X PUT "$PANEL_URL/api/admin/featherzerotrust/hashes/$HASH/confirm" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Hash confirmed as malicious

### POST `/api/admin/featherzerotrust/hashes/bulk/confirm`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-bulk-confirm`
- Controller: [`FeatherZeroTrustController::bulkConfirmHashes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L164)

**Confirm multiple hashes as malicious** Mark multiple hashes as confirmed malicious.

```bash
curl -X POST "$PANEL_URL/api/admin/featherzerotrust/hashes/bulk/confirm" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Bulk hash confirmation completed

### POST `/api/admin/featherzerotrust/hashes/bulk/delete`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-bulk-delete`
- Controller: [`FeatherZeroTrustController::bulkDeleteHashes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L176)

```bash
curl -X POST "$PANEL_URL/api/admin/featherzerotrust/hashes/bulk/delete" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### POST `/api/admin/featherzerotrust/hashes/import/malwarebazaar`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-import-malwarebazaar`
- Controller: [`FeatherZeroTrustController::importMalwareBazaarHashes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L188)

**Import hashes from MalwareBazaar** Pull recent suspicious hashes from MalwareBazaar and store them in FeatherZeroTrust hash database.

```bash
curl -X POST "$PANEL_URL/api/admin/featherzerotrust/hashes/import/malwarebazaar" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` MalwareBazaar import completed

### DELETE `/api/admin/featherzerotrust/hashes/{hash}`

- Auth: Admin
- Permission: `admin.featherzerotrust.manage`
- Route name: `admin-featherzerotrust-hashes-delete`
- Controller: [`FeatherZeroTrustController::deleteHash`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/FeatherZeroTrustController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/featherzerotrust.php#L200)

**Delete hash** Delete a hash from the database.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | path | \- | yes |  |

```bash
curl -X DELETE "$PANEL_URL/api/admin/featherzerotrust/hashes/$HASH" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Hash deleted successfully
