|
| 1 | +# hostinger_api.AgencyHostingMetricsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**list_agency_plan_order_disk_usage_metrics_v1**](AgencyHostingMetricsApi.md#list_agency_plan_order_disk_usage_metrics_v1) | **GET** /api/agency-hosting/v1/orders/{order_id}/disk-usage-metrics | List Agency Plan order disk usage metrics |
| 8 | +[**list_order_resource_usage_metrics_v1**](AgencyHostingMetricsApi.md#list_order_resource_usage_metrics_v1) | **GET** /api/agency-hosting/v1/orders/{order_id}/resource-usage-metrics | List order resource usage metrics |
| 9 | + |
| 10 | + |
| 11 | +# **list_agency_plan_order_disk_usage_metrics_v1** |
| 12 | +> AgencyHostingV1OrdersDiskUsageMetricsMetricsResource list_agency_plan_order_disk_usage_metrics_v1(order_id, time_frame_days=time_frame_days) |
| 13 | +
|
| 14 | +List Agency Plan order disk usage metrics |
| 15 | + |
| 16 | +Returns aggregated disk and inode usage for the Agency Plan order over the |
| 17 | +selected time frame, plus the plan quotas. Figures cover the whole order |
| 18 | +account. Values may be up to one hour stale. CPU, memory, and process usage |
| 19 | +are on the resource-usage-metrics endpoint. |
| 20 | + |
| 21 | +### Example |
| 22 | + |
| 23 | +* Bearer Authentication (apiToken): |
| 24 | + |
| 25 | +```python |
| 26 | +import hostinger_api |
| 27 | +from hostinger_api.models.agency_hosting_v1_orders_disk_usage_metrics_metrics_resource import AgencyHostingV1OrdersDiskUsageMetricsMetricsResource |
| 28 | +from hostinger_api.rest import ApiException |
| 29 | +from pprint import pprint |
| 30 | + |
| 31 | + |
| 32 | +# Configure Bearer authorization: apiToken |
| 33 | +configuration = hostinger_api.Configuration( |
| 34 | + access_token = os.environ["BEARER_TOKEN"] |
| 35 | +) |
| 36 | + |
| 37 | +# Enter a context with an instance of the API client |
| 38 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 39 | + # Create an instance of the API class |
| 40 | + api_instance = hostinger_api.AgencyHostingMetricsApi(api_client) |
| 41 | + order_id = 123456 # int | Agency Plan order ID |
| 42 | + time_frame_days = 1 # int | Length of the window in days, ending now. Bucket size grows with the window. (optional) (default to 1) |
| 43 | + |
| 44 | + try: |
| 45 | + # List Agency Plan order disk usage metrics |
| 46 | + api_response = api_instance.list_agency_plan_order_disk_usage_metrics_v1(order_id, time_frame_days=time_frame_days) |
| 47 | + print("The response of AgencyHostingMetricsApi->list_agency_plan_order_disk_usage_metrics_v1:\n") |
| 48 | + pprint(api_response) |
| 49 | + except Exception as e: |
| 50 | + print("Exception when calling AgencyHostingMetricsApi->list_agency_plan_order_disk_usage_metrics_v1: %s\n" % e) |
| 51 | +``` |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +### Parameters |
| 56 | + |
| 57 | + |
| 58 | +Name | Type | Description | Notes |
| 59 | +------------- | ------------- | ------------- | ------------- |
| 60 | + **order_id** | **int**| Agency Plan order ID | |
| 61 | + **time_frame_days** | **int**| Length of the window in days, ending now. Bucket size grows with the window. | [optional] [default to 1] |
| 62 | + |
| 63 | +### Return type |
| 64 | + |
| 65 | +[**AgencyHostingV1OrdersDiskUsageMetricsMetricsResource**](AgencyHostingV1OrdersDiskUsageMetricsMetricsResource.md) |
| 66 | + |
| 67 | +### Authorization |
| 68 | + |
| 69 | +[apiToken](../README.md#apiToken) |
| 70 | + |
| 71 | +### HTTP request headers |
| 72 | + |
| 73 | + - **Content-Type**: Not defined |
| 74 | + - **Accept**: application/json |
| 75 | + |
| 76 | +### HTTP response details |
| 77 | + |
| 78 | +| Status code | Description | Response headers | |
| 79 | +|-------------|-------------|------------------| |
| 80 | +**200** | Success response | - | |
| 81 | +**422** | Validation error response | - | |
| 82 | +**401** | Unauthenticated response | - | |
| 83 | +**500** | Error response | - | |
| 84 | + |
| 85 | +[[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) |
| 86 | + |
| 87 | +# **list_order_resource_usage_metrics_v1** |
| 88 | +> AgencyHostingV1OrdersResourceUsageMetricsMetricsResource list_order_resource_usage_metrics_v1(order_id, time_frame_hours=time_frame_hours) |
| 89 | +
|
| 90 | +List order resource usage metrics |
| 91 | + |
| 92 | +Returns aggregated CPU, memory, and process usage for the Agency Plan order |
| 93 | +over the selected time frame, plus the plan quotas and a per-website |
| 94 | +breakdown. Each website is identified by uid. Suspended and deleted websites |
| 95 | +are excluded from both the order totals and the per-website breakdown. |
| 96 | +Values may be up to one hour stale. Disk and inode usage are on the |
| 97 | +disk-usage-metrics endpoint. |
| 98 | + |
| 99 | +### Example |
| 100 | + |
| 101 | +* Bearer Authentication (apiToken): |
| 102 | + |
| 103 | +```python |
| 104 | +import hostinger_api |
| 105 | +from hostinger_api.models.agency_hosting_v1_orders_resource_usage_metrics_metrics_resource import AgencyHostingV1OrdersResourceUsageMetricsMetricsResource |
| 106 | +from hostinger_api.rest import ApiException |
| 107 | +from pprint import pprint |
| 108 | + |
| 109 | + |
| 110 | +# Configure Bearer authorization: apiToken |
| 111 | +configuration = hostinger_api.Configuration( |
| 112 | + access_token = os.environ["BEARER_TOKEN"] |
| 113 | +) |
| 114 | + |
| 115 | +# Enter a context with an instance of the API client |
| 116 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 117 | + # Create an instance of the API class |
| 118 | + api_instance = hostinger_api.AgencyHostingMetricsApi(api_client) |
| 119 | + order_id = 123456 # int | Agency Plan order ID |
| 120 | + time_frame_hours = 24 # int | Length of the window in hours, ending now. Bucket size grows with the window. (optional) (default to 24) |
| 121 | + |
| 122 | + try: |
| 123 | + # List order resource usage metrics |
| 124 | + api_response = api_instance.list_order_resource_usage_metrics_v1(order_id, time_frame_hours=time_frame_hours) |
| 125 | + print("The response of AgencyHostingMetricsApi->list_order_resource_usage_metrics_v1:\n") |
| 126 | + pprint(api_response) |
| 127 | + except Exception as e: |
| 128 | + print("Exception when calling AgencyHostingMetricsApi->list_order_resource_usage_metrics_v1: %s\n" % e) |
| 129 | +``` |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +### Parameters |
| 134 | + |
| 135 | + |
| 136 | +Name | Type | Description | Notes |
| 137 | +------------- | ------------- | ------------- | ------------- |
| 138 | + **order_id** | **int**| Agency Plan order ID | |
| 139 | + **time_frame_hours** | **int**| Length of the window in hours, ending now. Bucket size grows with the window. | [optional] [default to 24] |
| 140 | + |
| 141 | +### Return type |
| 142 | + |
| 143 | +[**AgencyHostingV1OrdersResourceUsageMetricsMetricsResource**](AgencyHostingV1OrdersResourceUsageMetricsMetricsResource.md) |
| 144 | + |
| 145 | +### Authorization |
| 146 | + |
| 147 | +[apiToken](../README.md#apiToken) |
| 148 | + |
| 149 | +### HTTP request headers |
| 150 | + |
| 151 | + - **Content-Type**: Not defined |
| 152 | + - **Accept**: application/json |
| 153 | + |
| 154 | +### HTTP response details |
| 155 | + |
| 156 | +| Status code | Description | Response headers | |
| 157 | +|-------------|-------------|------------------| |
| 158 | +**200** | Success response | - | |
| 159 | +**422** | Validation error response | - | |
| 160 | +**401** | Unauthenticated response | - | |
| 161 | +**500** | Error response | - | |
| 162 | + |
| 163 | +[[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) |
| 164 | + |
0 commit comments