# Mounts endpoints (Admin API)

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

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

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

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

**List mounts**

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

### PUT `/api/admin/mounts`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-create`
- Controller: [`MountsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L36)

**Create mount**

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

Plugin events: [`featherpanel:admin:mounts:mount:created`](https://featherpanel.com/docs/plugins/events/mounts/#mount-created)

### GET `/api/admin/mounts/{id}`

- Auth: Admin
- Permission: `admin.nodes.view`
- Route name: `admin-mounts-show`
- Controller: [`MountsController::show`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L47)

**Get mount**

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

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

### PATCH `/api/admin/mounts/{id}`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-update`
- Controller: [`MountsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L62)

**Update mount**

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

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

Plugin events: [`featherpanel:admin:mounts:mount:updated`](https://featherpanel.com/docs/plugins/events/mounts/#mount-updated)

### DELETE `/api/admin/mounts/{id}`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-delete`
- Controller: [`MountsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L78)

**Delete mount**

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

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

Plugin events: [`featherpanel:admin:mounts:mount:deleted`](https://featherpanel.com/docs/plugins/events/mounts/#mount-deleted)

### PATCH `/api/admin/mounts/{id}/nodes`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-set-nodes`
- Controller: [`MountsController::setNodes`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L94)

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

```bash
curl -X PATCH "$PANEL_URL/api/admin/mounts/$ID/nodes" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### PATCH `/api/admin/mounts/{id}/spells`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-set-spells`
- Controller: [`MountsController::setSpells`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L110)

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

```bash
curl -X PATCH "$PANEL_URL/api/admin/mounts/$ID/spells" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### PATCH `/api/admin/mounts/{id}/links`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-set-links`
- Controller: [`MountsController::setNodesAndSpells`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L126)

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

```bash
curl -X PATCH "$PANEL_URL/api/admin/mounts/$ID/links" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### PATCH `/api/admin/mounts/{id}/servers`

- Auth: Admin
- Permission: `admin.nodes.edit`
- Route name: `admin-mounts-set-servers`
- Controller: [`MountsController::setServers`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/MountsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/mounts.php#L142)

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

```bash
curl -X PATCH "$PANEL_URL/api/admin/mounts/$ID/servers" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```
