Update API documentation for node management to include base address requirement in PUT requests
- Modified the API design documentation to clarify that the `baseAddress` field is now mandatory in the `PUT /api/admin/nodes/{id}` endpoint.
- Updated descriptions to reflect the validation process for the base address and its impact on client gateway caching.
- Ensured consistency in documentation regarding optional fields and their behavior during updates.
This commit is contained in:
+4
-1
@@ -293,7 +293,7 @@ approve/reject над `ActivationRequest`.
|
||||
| ------ | ----------------------------- | ----- | ---------------------------------------------------------------------------- | ------------- |
|
||||
| GET | `/api/admin/nodes` | admin | — | `NodeDto[]` |
|
||||
| POST | `/api/admin/nodes` | admin | `{ name, baseAddress, username, password, location? }` | `NodeDto` |
|
||||
| PUT | `/api/admin/nodes/{id}` | admin | `{ name, location?, isEnabled, username?, password? }` | `NodeDto` |
|
||||
| PUT | `/api/admin/nodes/{id}` | admin | `{ name, baseAddress, location?, isEnabled, username?, password? }` | `NodeDto` |
|
||||
| DELETE | `/api/admin/nodes/{id}` | admin | — | `204 No Content` |
|
||||
| POST | `/api/admin/nodes/{id}/sync` | admin | — | `{ inboundsSynced, status }` |
|
||||
| POST | `/api/admin/nodes/{id}/probe` | admin | — | `{ isReachable, errorMessage, status }` |
|
||||
@@ -301,6 +301,9 @@ approve/reject над `ActivationRequest`.
|
||||
`DELETE /api/admin/nodes/{id}` удаляет её инбаунды каскадно **без проверки существующих конфигов**
|
||||
на них — известный пробел (см. [tech-stack.md](tech-stack.md)), а не осознанная защита.
|
||||
`username`/`password` в `PUT` — оба опциональны; креденшлы меняются, только если заданы **оба**.
|
||||
`baseAddress` в `PUT` обязателен (в отличие от `username`/`password`) — форма всегда шлёт текущее
|
||||
значение; при реальном изменении бэкенд валидирует новый адрес через `IXuiPanelGateway.ValidateBaseAddress`
|
||||
и инвалидирует закэшированный per-node клиент гейтвея (как и при смене креденшлов).
|
||||
|
||||
## Admin — Inbounds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user