# Storage Destinations endpoints (Client API: account)

> 10 FeatherPanel Client API: account endpoints from user/storage-destinations.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/user/storage-destinations/

Defined in [`backend/app/routes/user/storage-destinations.php`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php). Authentication used here: **Signed-in user**, **Public**. 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/user/storage-destinations`

- Auth: Signed-in user
- Default rate limit: 60 / minute (`user-storage-destinations`)
- Route name: `user-storage-destinations`
- Controller: [`StorageDestinationController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L42)

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

### POST `/api/user/storage-destinations`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-create`
- Controller: [`StorageDestinationController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L54)

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

### PATCH `/api/user/storage-destinations/{id}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-update`
- Controller: [`StorageDestinationController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L66)

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

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

### PUT `/api/user/storage-destinations/{id}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-update`
- Controller: [`StorageDestinationController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L66)

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

```bash
curl -X PUT "$PANEL_URL/api/user/storage-destinations/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### DELETE `/api/user/storage-destinations/{id}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-delete`
- Controller: [`StorageDestinationController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L78)

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

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

### POST `/api/user/storage-destinations/{id}/test`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-test`)
- Route name: `user-storage-destination-test`
- Controller: [`StorageDestinationController::test`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageDestinationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L90)

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

```bash
curl -X POST "$PANEL_URL/api/user/storage-destinations/$ID/test" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### POST `/api/user/storage-destinations/oauth/{provider}/start`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-oauth-start`
- Controller: [`StorageOAuthController::start`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/StorageOAuthController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L110)

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

```bash
curl -X POST "$PANEL_URL/api/user/storage-destinations/oauth/$PROVIDER/start" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### GET `/api/user/storage-destinations/oauth/{provider}/callback`

- Auth: Public
- Default rate limit: 20 / minute (`user-storage-destination-write`)
- Route name: `user-storage-destination-oauth-callback`
- Controller: `AuthMiddleware::handle`
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L124)

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

```bash
curl -X GET "$PANEL_URL/api/user/storage-destinations/oauth/$PROVIDER/callback" \
  -H "Accept: application/json"
```

### GET `/api/storage/backups/{uuid}/download`

- Auth: Public
- Default rate limit: 30 / minute (`storage-backup-stream`)
- Route name: `storage-backup-stream`
- Controller: [`BackupStreamController::download`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/BackupStreamController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L147)

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

```bash
curl -X GET "$PANEL_URL/api/storage/backups/$UUID/download" \
  -H "Accept: application/json"
```

### PUT `/api/storage/relay/{uuid}`

- Auth: Public
- Default rate limit: 600 / minute (`storage-backup-relay`)
- Route name: `storage-backup-relay`
- Controller: [`RelayUploadController::receive`](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/Controllers/User/Storage/RelayUploadController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/3faf369c3b4b626654434921a2ee2655ff85da45/backend/app/routes/user/storage-destinations.php#L165)

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

```bash
curl -X PUT "$PANEL_URL/api/storage/relay/$UUID" \
  -H "Accept: application/json"
```
