mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-08-30 13:23:02 +00:00
feat: add host tags management - метод get_hosts_tags()
feat: add advanced host options - поля tag, isHidden, muxParams, sockoptParams
update: relax validation - username min 3 chars, node name min 3 chars
update: reduce host description - max 30 chars (было 50)
update: add name fields - для config profiles и internal squads
‼️ fix: remove tokenDescription - убрано из CreateApiTokenRequestDto
45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
from remnawave.models import (
|
|
GetBandwidthStatsResponseDto,
|
|
GetNodesStatisticsResponseDto,
|
|
GetStatsResponseDto,
|
|
GetNodesMetricsResponseDto,
|
|
GetRemnawaveHealthResponseDto,
|
|
)
|
|
from remnawave.rapid import BaseController, get
|
|
|
|
|
|
class SystemController(BaseController):
|
|
@get("/system/stats", response_class=GetStatsResponseDto)
|
|
async def get_stats(
|
|
self,
|
|
) -> GetStatsResponseDto:
|
|
"""Get System Stats"""
|
|
...
|
|
|
|
@get("/system/stats/bandwidth", response_class=GetBandwidthStatsResponseDto)
|
|
async def get_bandwidth_stats(
|
|
self,
|
|
) -> GetBandwidthStatsResponseDto:
|
|
"""Get System Bandwidth Statistics"""
|
|
...
|
|
|
|
@get("/system/stats/nodes", response_class=GetNodesStatisticsResponseDto)
|
|
async def get_nodes_statistics(
|
|
self,
|
|
) -> GetNodesStatisticsResponseDto:
|
|
"""Get Nodes Statistics"""
|
|
...
|
|
|
|
@get("/system/health", response_class=GetRemnawaveHealthResponseDto)
|
|
async def get_health(
|
|
self,
|
|
) -> GetRemnawaveHealthResponseDto:
|
|
"""Get System Health"""
|
|
...
|
|
|
|
@get("/system/nodes/metrics", response_class=GetNodesMetricsResponseDto)
|
|
async def get_nodes_metrics(
|
|
self,
|
|
) -> GetNodesMetricsResponseDto:
|
|
"""Get Nodes Metrics"""
|
|
...
|