Skip to content

Commit 231636a

Browse files
committed
Updated: 2025-04-04
1 parent 5ab0f89 commit 231636a

17 files changed

Lines changed: 789 additions & 4 deletions

.openapi-generator/FILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ docs/GetServerDisks200Response.md
245245
docs/GetServerIPs200Response.md
246246
docs/GetServerLogs200Response.md
247247
docs/GetServerStatistics200Response.md
248+
docs/GetServerStatisticsNew200Response.md
248249
docs/GetServers200Response.md
249250
docs/GetServersPresets200Response.md
250251
docs/GetSoftware200Response.md
@@ -350,6 +351,8 @@ docs/ServersOsRequirements.md
350351
docs/ServersPreset.md
351352
docs/ServersSoftware.md
352353
docs/ServersSoftwareRequirements.md
354+
docs/ServersStatistics.md
355+
docs/ServersStatisticsMeta.md
353356
docs/SetLabels.md
354357
docs/SettingCondition.md
355358
docs/SpamFilterIsDisabled.md
@@ -657,6 +660,7 @@ test/test_get_server_disks200_response.py
657660
test/test_get_server_ips200_response.py
658661
test/test_get_server_logs200_response.py
659662
test/test_get_server_statistics200_response.py
663+
test/test_get_server_statistics_new200_response.py
660664
test/test_get_servers200_response.py
661665
test/test_get_servers_presets200_response.py
662666
test/test_get_software200_response.py
@@ -761,6 +765,8 @@ test/test_servers_os_requirements.py
761765
test/test_servers_preset.py
762766
test/test_servers_software.py
763767
test/test_servers_software_requirements.py
768+
test/test_servers_statistics.py
769+
test/test_servers_statistics_meta.py
764770
test/test_set_labels.py
765771
test/test_setting_condition.py
766772
test/test_spam_filter_is_disabled.py
@@ -1079,6 +1085,7 @@ timeweb_cloud_api/models/get_server_disks200_response.py
10791085
timeweb_cloud_api/models/get_server_ips200_response.py
10801086
timeweb_cloud_api/models/get_server_logs200_response.py
10811087
timeweb_cloud_api/models/get_server_statistics200_response.py
1088+
timeweb_cloud_api/models/get_server_statistics_new200_response.py
10821089
timeweb_cloud_api/models/get_servers200_response.py
10831090
timeweb_cloud_api/models/get_servers_presets200_response.py
10841091
timeweb_cloud_api/models/get_software200_response.py
@@ -1175,6 +1182,8 @@ timeweb_cloud_api/models/servers_os_requirements.py
11751182
timeweb_cloud_api/models/servers_preset.py
11761183
timeweb_cloud_api/models/servers_software.py
11771184
timeweb_cloud_api/models/servers_software_requirements.py
1185+
timeweb_cloud_api/models/servers_statistics.py
1186+
timeweb_cloud_api/models/servers_statistics_meta.py
11781187
timeweb_cloud_api/models/set_labels.py
11791188
timeweb_cloud_api/models/setting_condition.py
11801189
timeweb_cloud_api/models/spam_filter_is_disabled.py

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ Class | Method | HTTP request | Description
491491
*ServersApi* | [**get_server_ips**](docs/ServersApi.md#get_server_ips) | **GET** /api/v1/servers/{server_id}/ips | Получение списка IP-адресов сервера
492492
*ServersApi* | [**get_server_logs**](docs/ServersApi.md#get_server_logs) | **GET** /api/v1/servers/{server_id}/logs | Получение списка логов сервера
493493
*ServersApi* | [**get_server_statistics**](docs/ServersApi.md#get_server_statistics) | **GET** /api/v1/servers/{server_id}/statistics | Получение статистики сервера
494+
*ServersApi* | [**get_server_statistics_new**](docs/ServersApi.md#get_server_statistics_new) | **GET** /api/v1/servers/{server_id}/statistics/{time_from}/{period}/{keys} | Получение статистики сервера
494495
*ServersApi* | [**get_servers**](docs/ServersApi.md#get_servers) | **GET** /api/v1/servers | Получение списка серверов
495496
*ServersApi* | [**get_servers_presets**](docs/ServersApi.md#get_servers_presets) | **GET** /api/v1/presets/servers | Получение списка тарифов серверов
496497
*ServersApi* | [**get_software**](docs/ServersApi.md#get_software) | **GET** /api/v1/software/servers | Получение списка ПО из маркетплейса
@@ -752,6 +753,7 @@ Class | Method | HTTP request | Description
752753
- [GetServerIPs200Response](docs/GetServerIPs200Response.md)
753754
- [GetServerLogs200Response](docs/GetServerLogs200Response.md)
754755
- [GetServerStatistics200Response](docs/GetServerStatistics200Response.md)
756+
- [GetServerStatisticsNew200Response](docs/GetServerStatisticsNew200Response.md)
755757
- [GetServers200Response](docs/GetServers200Response.md)
756758
- [GetServersPresets200Response](docs/GetServersPresets200Response.md)
757759
- [GetSoftware200Response](docs/GetSoftware200Response.md)
@@ -848,6 +850,8 @@ Class | Method | HTTP request | Description
848850
- [ServersPreset](docs/ServersPreset.md)
849851
- [ServersSoftware](docs/ServersSoftware.md)
850852
- [ServersSoftwareRequirements](docs/ServersSoftwareRequirements.md)
853+
- [ServersStatistics](docs/ServersStatistics.md)
854+
- [ServersStatisticsMeta](docs/ServersStatisticsMeta.md)
851855
- [SetLabels](docs/SetLabels.md)
852856
- [SettingCondition](docs/SettingCondition.md)
853857
- [SpamFilterIsDisabled](docs/SpamFilterIsDisabled.md)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# GetServerStatisticsNew200Response
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**statistics** | **object** | | [optional]
8+
9+
## Example
10+
11+
```python
12+
from timeweb_cloud_api.models.get_server_statistics_new200_response import GetServerStatisticsNew200Response
13+
14+
# TODO update the JSON string below
15+
json = "{}"
16+
# create an instance of GetServerStatisticsNew200Response from a JSON string
17+
get_server_statistics_new200_response_instance = GetServerStatisticsNew200Response.from_json(json)
18+
# print the JSON string representation of the object
19+
print GetServerStatisticsNew200Response.to_json()
20+
21+
# convert the object into a dict
22+
get_server_statistics_new200_response_dict = get_server_statistics_new200_response_instance.to_dict()
23+
# create an instance of GetServerStatisticsNew200Response from a dict
24+
get_server_statistics_new200_response_form_dict = get_server_statistics_new200_response.from_dict(get_server_statistics_new200_response_dict)
25+
```
26+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
27+
28+

docs/NetworkDrivesApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ void (empty response body)
565565
### HTTP response details
566566
| Status code | Description | Response headers |
567567
|-------------|-------------|------------------|
568-
**204** | Сетевой диск успешно подключен | - |
568+
**201** | Сетевой диск успешно подключен | - |
569569
**400** | | - |
570570
**401** | | - |
571571
**403** | | - |
@@ -644,7 +644,7 @@ void (empty response body)
644644
### HTTP response details
645645
| Status code | Description | Response headers |
646646
|-------------|-------------|------------------|
647-
**204** | Сетевой диск успешно отключен | - |
647+
**201** | Сетевой диск успешно отключен | - |
648648
**400** | | - |
649649
**401** | | - |
650650
**403** | | - |

docs/ServersApi.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Method | HTTP request | Description
2424
[**get_server_ips**](ServersApi.md#get_server_ips) | **GET** /api/v1/servers/{server_id}/ips | Получение списка IP-адресов сервера
2525
[**get_server_logs**](ServersApi.md#get_server_logs) | **GET** /api/v1/servers/{server_id}/logs | Получение списка логов сервера
2626
[**get_server_statistics**](ServersApi.md#get_server_statistics) | **GET** /api/v1/servers/{server_id}/statistics | Получение статистики сервера
27+
[**get_server_statistics_new**](ServersApi.md#get_server_statistics_new) | **GET** /api/v1/servers/{server_id}/statistics/{time_from}/{period}/{keys} | Получение статистики сервера
2728
[**get_servers**](ServersApi.md#get_servers) | **GET** /api/v1/servers | Получение списка серверов
2829
[**get_servers_presets**](ServersApi.md#get_servers_presets) | **GET** /api/v1/presets/servers | Получение списка тарифов серверов
2930
[**get_software**](ServersApi.md#get_software) | **GET** /api/v1/software/servers | Получение списка ПО из маркетплейса
@@ -1724,6 +1725,95 @@ Name | Type | Description | Notes
17241725

17251726
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
17261727

1728+
# **get_server_statistics_new**
1729+
> GetServerStatisticsNew200Response get_server_statistics_new(server_id, time_from, period, keys)
1730+
1731+
Получение статистики сервера
1732+
1733+
Чтобы получить статистику сервера, отправьте GET-запрос на `/api/v1/servers/{server_id}/{time_from}/{period}/{keys}`.
1734+
1735+
### Example
1736+
1737+
* Bearer (JWT) Authentication (Bearer):
1738+
```python
1739+
import time
1740+
import os
1741+
import timeweb_cloud_api
1742+
from timeweb_cloud_api.models.get_server_statistics_new200_response import GetServerStatisticsNew200Response
1743+
from timeweb_cloud_api.rest import ApiException
1744+
from pprint import pprint
1745+
1746+
# Defining the host is optional and defaults to https://api.timeweb.cloud
1747+
# See configuration.py for a list of all supported configuration parameters.
1748+
configuration = timeweb_cloud_api.Configuration(
1749+
host = "https://api.timeweb.cloud"
1750+
)
1751+
1752+
# The client must configure the authentication and authorization parameters
1753+
# in accordance with the API server security policy.
1754+
# Examples for each auth method are provided below, use the example that
1755+
# satisfies your auth use case.
1756+
1757+
# Configure Bearer authorization (JWT): Bearer
1758+
configuration = timeweb_cloud_api.Configuration(
1759+
access_token = os.environ["BEARER_TOKEN"]
1760+
)
1761+
1762+
# Enter a context with an instance of the API client
1763+
with timeweb_cloud_api.ApiClient(configuration) as api_client:
1764+
# Create an instance of the API class
1765+
api_instance = timeweb_cloud_api.ServersApi(api_client)
1766+
server_id = 1051 # object | ID облачного сервера.
1767+
time_from = Wed Apr 02 2025 13:27:02 GMT+0300 (Москва, стандартное время) # object | Дата начала сбора статистики.
1768+
period = 24 # object | Количество часов за период которых нужна статистика.
1769+
keys = system.cpu.util;network.request;network.response # object | Ключи выбираемых видов статистики.
1770+
1771+
try:
1772+
# Получение статистики сервера
1773+
api_response = api_instance.get_server_statistics_new(server_id, time_from, period, keys)
1774+
print("The response of ServersApi->get_server_statistics_new:\n")
1775+
pprint(api_response)
1776+
except Exception as e:
1777+
print("Exception when calling ServersApi->get_server_statistics_new: %s\n" % e)
1778+
```
1779+
1780+
1781+
### Parameters
1782+
1783+
Name | Type | Description | Notes
1784+
------------- | ------------- | ------------- | -------------
1785+
**server_id** | [**object**](.md)| ID облачного сервера. |
1786+
**time_from** | [**object**](.md)| Дата начала сбора статистики. |
1787+
**period** | [**object**](.md)| Количество часов за период которых нужна статистика. |
1788+
**keys** | [**object**](.md)| Ключи выбираемых видов статистики. |
1789+
1790+
### Return type
1791+
1792+
[**GetServerStatisticsNew200Response**](GetServerStatisticsNew200Response.md)
1793+
1794+
### Authorization
1795+
1796+
[Bearer](../README.md#Bearer)
1797+
1798+
### HTTP request headers
1799+
1800+
- **Content-Type**: Not defined
1801+
- **Accept**: application/json
1802+
1803+
### HTTP response details
1804+
| Status code | Description | Response headers |
1805+
|-------------|-------------|------------------|
1806+
**200** | Объект JSON c ключом `statistics` | - |
1807+
**400** | | - |
1808+
**401** | | - |
1809+
**403** | | - |
1810+
**404** | | - |
1811+
**409** | | - |
1812+
**429** | | - |
1813+
**500** | | - |
1814+
1815+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1816+
17271817
# **get_servers**
17281818
> GetServers200Response get_servers(limit=limit, offset=offset)
17291819

docs/ServersStatistics.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ServersStatistics
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **object** | Имя статистики. | [optional]
8+
**list** | **object** | | [optional]
9+
**meta** | [**ServersStatisticsMeta**](ServersStatisticsMeta.md) | | [optional]
10+
11+
## Example
12+
13+
```python
14+
from timeweb_cloud_api.models.servers_statistics import ServersStatistics
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of ServersStatistics from a JSON string
19+
servers_statistics_instance = ServersStatistics.from_json(json)
20+
# print the JSON string representation of the object
21+
print ServersStatistics.to_json()
22+
23+
# convert the object into a dict
24+
servers_statistics_dict = servers_statistics_instance.to_dict()
25+
# create an instance of ServersStatistics from a dict
26+
servers_statistics_form_dict = servers_statistics.from_dict(servers_statistics_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

docs/ServersStatisticsMeta.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ServersStatisticsMeta
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**amount** | **object** | Число элементов в результате |
8+
9+
## Example
10+
11+
```python
12+
from timeweb_cloud_api.models.servers_statistics_meta import ServersStatisticsMeta
13+
14+
# TODO update the JSON string below
15+
json = "{}"
16+
# create an instance of ServersStatisticsMeta from a JSON string
17+
servers_statistics_meta_instance = ServersStatisticsMeta.from_json(json)
18+
# print the JSON string representation of the object
19+
print ServersStatisticsMeta.to_json()
20+
21+
# convert the object into a dict
22+
servers_statistics_meta_dict = servers_statistics_meta_instance.to_dict()
23+
# create an instance of ServersStatisticsMeta from a dict
24+
servers_statistics_meta_form_dict = servers_statistics_meta.from_dict(servers_statistics_meta_dict)
25+
```
26+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
27+
28+

0 commit comments

Comments
 (0)