diff --git a/.swagger-codegen/config.json b/.swagger-codegen/config.json index 7ea07f4..4890b6c 100644 --- a/.swagger-codegen/config.json +++ b/.swagger-codegen/config.json @@ -3,5 +3,5 @@ "gitUserId": "wavefrontHQ", "packageName": "wavefront_api_client", "packageUrl": "https://github.com/wavefrontHQ/python-client", - "packageVersion": "2.213.0" + "packageVersion": "2.214.0" } diff --git a/.swagger-codegen/config.jsone b/.swagger-codegen/config.jsone index d1a9877..7ea07f4 100644 --- a/.swagger-codegen/config.jsone +++ b/.swagger-codegen/config.jsone @@ -3,5 +3,5 @@ "gitUserId": "wavefrontHQ", "packageName": "wavefront_api_client", "packageUrl": "https://github.com/wavefrontHQ/python-client", - "packageVersion": "2.210.2" + "packageVersion": "2.213.0" } diff --git a/README.md b/README.md index fe11ed1..b97dbe6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v2 -- Package version: 2.213.0 +- Package version: 2.214.0 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -128,6 +128,11 @@ Class | Method | HTTP request | Description *AlertApi* | [**unhide_alert**](docs/AlertApi.md#unhide_alert) | **POST** /api/v2/alert/{id}/install | Unhide a specific integration alert *AlertApi* | [**unsnooze_alert**](docs/AlertApi.md#unsnooze_alert) | **POST** /api/v2/alert/{id}/unsnooze | Unsnooze a specific alert *AlertApi* | [**update_alert**](docs/AlertApi.md#update_alert) | **PUT** /api/v2/alert/{id} | Update a specific alert +*AlertAnalyticsApi* | [**get_active_no_target_alert_summary_details**](docs/AlertAnalyticsApi.md#get_active_no_target_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/noTarget | Get Active No Target Alert Summary for a customer +*AlertAnalyticsApi* | [**get_alert_analytics_errors_summary**](docs/AlertAnalyticsApi.md#get_alert_analytics_errors_summary) | **GET** /api/v2/alert/analytics/summary/errors | Get Alert Analytics errors summary +*AlertAnalyticsApi* | [**get_alert_analytics_summary**](docs/AlertAnalyticsApi.md#get_alert_analytics_summary) | **GET** /api/v2/alert/analytics/summary | Get Alert Analytics Summary for a customer +*AlertAnalyticsApi* | [**get_failed_alert_summary_details**](docs/AlertAnalyticsApi.md#get_failed_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/failed | Get Failed Alert Summary Details for a customer +*AlertAnalyticsApi* | [**get_no_data_alert_summary_details**](docs/AlertAnalyticsApi.md#get_no_data_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/noData | Get No Data Alert Summary for a customer *ApiTokenApi* | [**create_token**](docs/ApiTokenApi.md#create_token) | **POST** /api/v2/apitoken | Create new api token *ApiTokenApi* | [**delete_customer_token**](docs/ApiTokenApi.md#delete_customer_token) | **PUT** /api/v2/apitoken/customertokens/revoke | Delete the specified api token for a customer *ApiTokenApi* | [**delete_token**](docs/ApiTokenApi.md#delete_token) | **DELETE** /api/v2/apitoken/{id} | Delete the specified api token @@ -315,6 +320,9 @@ Class | Method | HTTP request | Description *SearchApi* | [**search_alert_deleted_for_facet**](docs/SearchApi.md#search_alert_deleted_for_facet) | **POST** /api/v2/search/alert/deleted/{facet} | Lists the values of a specific facet over the customer's deleted alerts *SearchApi* | [**search_alert_deleted_for_facets**](docs/SearchApi.md#search_alert_deleted_for_facets) | **POST** /api/v2/search/alert/deleted/facets | Lists the values of one or more facets over the customer's deleted alerts *SearchApi* | [**search_alert_entities**](docs/SearchApi.md#search_alert_entities) | **POST** /api/v2/search/alert | Search over a customer's non-deleted alerts +*SearchApi* | [**search_alert_execution_summary_entities**](docs/SearchApi.md#search_alert_execution_summary_entities) | **POST** /api/v2/search/alert-analytics-summary | Search over a customer's alert executions summaries +*SearchApi* | [**search_alert_execution_summary_for_facet**](docs/SearchApi.md#search_alert_execution_summary_for_facet) | **POST** /api/v2/search/alert-analytics-summary/{facet} | Lists the values of a specific facet over the customer's alert executions summaries +*SearchApi* | [**search_alert_execution_summary_for_facets**](docs/SearchApi.md#search_alert_execution_summary_for_facets) | **POST** /api/v2/search/alert-analytics-summary/facets | Lists the values of one or more facets over the customer's alert executions summaries *SearchApi* | [**search_alert_for_facet**](docs/SearchApi.md#search_alert_for_facet) | **POST** /api/v2/search/alert/{facet} | Lists the values of a specific facet over the customer's non-deleted alerts *SearchApi* | [**search_alert_for_facets**](docs/SearchApi.md#search_alert_for_facets) | **POST** /api/v2/search/alert/facets | Lists the values of one or more facets over the customer's non-deleted alerts *SearchApi* | [**search_cloud_integration_deleted_entities**](docs/SearchApi.md#search_cloud_integration_deleted_entities) | **POST** /api/v2/search/cloudintegration/deleted | Search over a customer's deleted cloud integrations diff --git a/docs/AlertAnalyticsApi.md b/docs/AlertAnalyticsApi.md new file mode 100644 index 0000000..e3c5427 --- /dev/null +++ b/docs/AlertAnalyticsApi.md @@ -0,0 +1,305 @@ +# wavefront_api_client.AlertAnalyticsApi + +All URIs are relative to *https://YOUR_INSTANCE.wavefront.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_active_no_target_alert_summary_details**](AlertAnalyticsApi.md#get_active_no_target_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/noTarget | Get Active No Target Alert Summary for a customer +[**get_alert_analytics_errors_summary**](AlertAnalyticsApi.md#get_alert_analytics_errors_summary) | **GET** /api/v2/alert/analytics/summary/errors | Get Alert Analytics errors summary +[**get_alert_analytics_summary**](AlertAnalyticsApi.md#get_alert_analytics_summary) | **GET** /api/v2/alert/analytics/summary | Get Alert Analytics Summary for a customer +[**get_failed_alert_summary_details**](AlertAnalyticsApi.md#get_failed_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/failed | Get Failed Alert Summary Details for a customer +[**get_no_data_alert_summary_details**](AlertAnalyticsApi.md#get_no_data_alert_summary_details) | **GET** /api/v2/alert/analytics/summary/alerts/noData | Get No Data Alert Summary for a customer + + +# **get_active_no_target_alert_summary_details** +> ResponseContainerPagedAlertAnalyticsSummaryDetail get_active_no_target_alert_summary_details(start, end=end, offset=offset, limit=limit) + +Get Active No Target Alert Summary for a customer + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.AlertAnalyticsApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds, null to use now (optional) +offset = 0 # int | offset for records (optional) (default to 0) +limit = 50 # int | Number of records (optional) (default to 50) + +try: + # Get Active No Target Alert Summary for a customer + api_response = api_instance.get_active_no_target_alert_summary_details(start, end=end, offset=offset, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertAnalyticsApi->get_active_no_target_alert_summary_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds, null to use now | [optional] + **offset** | **int**| offset for records | [optional] [default to 0] + **limit** | **int**| Number of records | [optional] [default to 50] + +### Return type + +[**ResponseContainerPagedAlertAnalyticsSummaryDetail**](ResponseContainerPagedAlertAnalyticsSummaryDetail.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **get_alert_analytics_errors_summary** +> ResponseContainerListAlertErrorGroupInfo get_alert_analytics_errors_summary(start, end=end) + +Get Alert Analytics errors summary + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.AlertAnalyticsApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds, null to use now (optional) + +try: + # Get Alert Analytics errors summary + api_response = api_instance.get_alert_analytics_errors_summary(start, end=end) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertAnalyticsApi->get_alert_analytics_errors_summary: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds, null to use now | [optional] + +### Return type + +[**ResponseContainerListAlertErrorGroupInfo**](ResponseContainerListAlertErrorGroupInfo.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **get_alert_analytics_summary** +> ResponseContainerAlertAnalyticsSummary get_alert_analytics_summary(start, end=end) + +Get Alert Analytics Summary for a customer + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.AlertAnalyticsApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds, null to use now (optional) + +try: + # Get Alert Analytics Summary for a customer + api_response = api_instance.get_alert_analytics_summary(start, end=end) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertAnalyticsApi->get_alert_analytics_summary: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds, null to use now | [optional] + +### Return type + +[**ResponseContainerAlertAnalyticsSummary**](ResponseContainerAlertAnalyticsSummary.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **get_failed_alert_summary_details** +> ResponseContainerPagedAlertAnalyticsSummaryDetail get_failed_alert_summary_details(start, end=end, offset=offset, limit=limit) + +Get Failed Alert Summary Details for a customer + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.AlertAnalyticsApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds, null to use now (optional) +offset = 0 # int | offset for records (optional) (default to 0) +limit = 50 # int | Number of records (optional) (default to 50) + +try: + # Get Failed Alert Summary Details for a customer + api_response = api_instance.get_failed_alert_summary_details(start, end=end, offset=offset, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertAnalyticsApi->get_failed_alert_summary_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds, null to use now | [optional] + **offset** | **int**| offset for records | [optional] [default to 0] + **limit** | **int**| Number of records | [optional] [default to 50] + +### Return type + +[**ResponseContainerPagedAlertAnalyticsSummaryDetail**](ResponseContainerPagedAlertAnalyticsSummaryDetail.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **get_no_data_alert_summary_details** +> ResponseContainerPagedAlertAnalyticsSummaryDetail get_no_data_alert_summary_details(start, end=end, offset=offset, limit=limit) + +Get No Data Alert Summary for a customer + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.AlertAnalyticsApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds, null to use now (optional) +offset = 0 # int | offset for records (optional) (default to 0) +limit = 50 # int | Number of records (optional) (default to 50) + +try: + # Get No Data Alert Summary for a customer + api_response = api_instance.get_no_data_alert_summary_details(start, end=end, offset=offset, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertAnalyticsApi->get_no_data_alert_summary_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds, null to use now | [optional] + **offset** | **int**| offset for records | [optional] [default to 0] + **limit** | **int**| Number of records | [optional] [default to 50] + +### Return type + +[**ResponseContainerPagedAlertAnalyticsSummaryDetail**](ResponseContainerPagedAlertAnalyticsSummaryDetail.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 1a1ada5..f817a49 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -11,6 +11,9 @@ Method | HTTP request | Description [**search_alert_deleted_for_facet**](SearchApi.md#search_alert_deleted_for_facet) | **POST** /api/v2/search/alert/deleted/{facet} | Lists the values of a specific facet over the customer's deleted alerts [**search_alert_deleted_for_facets**](SearchApi.md#search_alert_deleted_for_facets) | **POST** /api/v2/search/alert/deleted/facets | Lists the values of one or more facets over the customer's deleted alerts [**search_alert_entities**](SearchApi.md#search_alert_entities) | **POST** /api/v2/search/alert | Search over a customer's non-deleted alerts +[**search_alert_execution_summary_entities**](SearchApi.md#search_alert_execution_summary_entities) | **POST** /api/v2/search/alert-analytics-summary | Search over a customer's alert executions summaries +[**search_alert_execution_summary_for_facet**](SearchApi.md#search_alert_execution_summary_for_facet) | **POST** /api/v2/search/alert-analytics-summary/{facet} | Lists the values of a specific facet over the customer's alert executions summaries +[**search_alert_execution_summary_for_facets**](SearchApi.md#search_alert_execution_summary_for_facets) | **POST** /api/v2/search/alert-analytics-summary/facets | Lists the values of one or more facets over the customer's alert executions summaries [**search_alert_for_facet**](SearchApi.md#search_alert_for_facet) | **POST** /api/v2/search/alert/{facet} | Lists the values of a specific facet over the customer's non-deleted alerts [**search_alert_for_facets**](SearchApi.md#search_alert_for_facets) | **POST** /api/v2/search/alert/facets | Lists the values of one or more facets over the customer's non-deleted alerts [**search_cloud_integration_deleted_entities**](SearchApi.md#search_cloud_integration_deleted_entities) | **POST** /api/v2/search/cloudintegration/deleted | Search over a customer's deleted cloud integrations @@ -477,6 +480,182 @@ Name | Type | Description | Notes [[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) +# **search_alert_execution_summary_entities** +> ResponseContainerPagedAlertAnalyticsSummaryDetail search_alert_execution_summary_entities(start, end=end, body=body) + +Search over a customer's alert executions summaries + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.SearchApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds (optional) +body = wavefront_api_client.SortableSearchRequest() # SortableSearchRequest | (optional) + +try: + # Search over a customer's alert executions summaries + api_response = api_instance.search_alert_execution_summary_entities(start, end=end, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling SearchApi->search_alert_execution_summary_entities: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds | [optional] + **body** | [**SortableSearchRequest**](SortableSearchRequest.md)| | [optional] + +### Return type + +[**ResponseContainerPagedAlertAnalyticsSummaryDetail**](ResponseContainerPagedAlertAnalyticsSummaryDetail.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **search_alert_execution_summary_for_facet** +> ResponseContainerFacetResponse search_alert_execution_summary_for_facet(facet, start, end=end, body=body) + +Lists the values of a specific facet over the customer's alert executions summaries + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.SearchApi(wavefront_api_client.ApiClient(configuration)) +facet = 'facet_example' # str | +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds (optional) +body = wavefront_api_client.FacetSearchRequestContainer() # FacetSearchRequestContainer | (optional) + +try: + # Lists the values of a specific facet over the customer's alert executions summaries + api_response = api_instance.search_alert_execution_summary_for_facet(facet, start, end=end, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling SearchApi->search_alert_execution_summary_for_facet: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **facet** | **str**| | + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds | [optional] + **body** | [**FacetSearchRequestContainer**](FacetSearchRequestContainer.md)| | [optional] + +### Return type + +[**ResponseContainerFacetResponse**](ResponseContainerFacetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **search_alert_execution_summary_for_facets** +> ResponseContainerFacetsResponseContainer search_alert_execution_summary_for_facets(start, end=end, body=body) + +Lists the values of one or more facets over the customer's alert executions summaries + + + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = wavefront_api_client.Configuration() +configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = wavefront_api_client.SearchApi(wavefront_api_client.ApiClient(configuration)) +start = 789 # int | Start time in epoch seconds +end = 789 # int | End time in epoch seconds (optional) +body = wavefront_api_client.FacetsSearchRequestContainer() # FacetsSearchRequestContainer | (optional) + +try: + # Lists the values of one or more facets over the customer's alert executions summaries + api_response = api_instance.search_alert_execution_summary_for_facets(start, end=end, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling SearchApi->search_alert_execution_summary_for_facets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **int**| Start time in epoch seconds | + **end** | **int**| End time in epoch seconds | [optional] + **body** | [**FacetsSearchRequestContainer**](FacetsSearchRequestContainer.md)| | [optional] + +### Return type + +[**ResponseContainerFacetsResponseContainer**](ResponseContainerFacetsResponseContainer.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **search_alert_for_facet** > ResponseContainerFacetResponse search_alert_for_facet(facet, body=body) diff --git a/setup.py b/setup.py index 2e3fdae..7dd2474 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "wavefront-api-client" -VERSION = "2.213.0" +VERSION = "2.214.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_alert_analytics_api.py b/test/test_alert_analytics_api.py new file mode 100644 index 0000000..298bdab --- /dev/null +++ b/test/test_alert_analytics_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Wavefront REST API Documentation + +
The REST API enables you to interact with the Wavefront service by using standard REST API tools. You can use the REST API to automate commonly executed operations, for example to tag sources automatically.
When you make REST API calls outside the REST API documentation UI, to authenticate to the service, you must use an API token associated with a user account or a service account. For information on how to get the API token and examples, see Use the Wavefront REST API.
# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.api.alert_analytics_api import AlertAnalyticsApi # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestAlertAnalyticsApi(unittest.TestCase): + """AlertAnalyticsApi unit test stubs""" + + def setUp(self): + self.api = wavefront_api_client.api.alert_analytics_api.AlertAnalyticsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_active_no_target_alert_summary_details(self): + """Test case for get_active_no_target_alert_summary_details + + Get Active No Target Alert Summary for a customer # noqa: E501 + """ + pass + + def test_get_alert_analytics_errors_summary(self): + """Test case for get_alert_analytics_errors_summary + + Get Alert Analytics errors summary # noqa: E501 + """ + pass + + def test_get_alert_analytics_summary(self): + """Test case for get_alert_analytics_summary + + Get Alert Analytics Summary for a customer # noqa: E501 + """ + pass + + def test_get_failed_alert_summary_details(self): + """Test case for get_failed_alert_summary_details + + Get Failed Alert Summary Details for a customer # noqa: E501 + """ + pass + + def test_get_no_data_alert_summary_details(self): + """Test case for get_no_data_alert_summary_details + + Get No Data Alert Summary for a customer # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/wavefront_api_client/__init__.py b/wavefront_api_client/__init__.py index 033444f..86b24c6 100644 --- a/wavefront_api_client/__init__.py +++ b/wavefront_api_client/__init__.py @@ -19,6 +19,7 @@ from wavefront_api_client.api.access_policy_api import AccessPolicyApi from wavefront_api_client.api.account__user_and_service_account_api import AccountUserAndServiceAccountApi from wavefront_api_client.api.alert_api import AlertApi +from wavefront_api_client.api.alert_analytics_api import AlertAnalyticsApi from wavefront_api_client.api.api_token_api import ApiTokenApi from wavefront_api_client.api.cloud_integration_api import CloudIntegrationApi from wavefront_api_client.api.dashboard_api import DashboardApi diff --git a/wavefront_api_client/api/__init__.py b/wavefront_api_client/api/__init__.py index 21b30d0..b97962c 100644 --- a/wavefront_api_client/api/__init__.py +++ b/wavefront_api_client/api/__init__.py @@ -6,6 +6,7 @@ from wavefront_api_client.api.access_policy_api import AccessPolicyApi from wavefront_api_client.api.account__user_and_service_account_api import AccountUserAndServiceAccountApi from wavefront_api_client.api.alert_api import AlertApi +from wavefront_api_client.api.alert_analytics_api import AlertAnalyticsApi from wavefront_api_client.api.api_token_api import ApiTokenApi from wavefront_api_client.api.cloud_integration_api import CloudIntegrationApi from wavefront_api_client.api.dashboard_api import DashboardApi diff --git a/wavefront_api_client/api/alert_analytics_api.py b/wavefront_api_client/api/alert_analytics_api.py new file mode 100644 index 0000000..62c7ad6 --- /dev/null +++ b/wavefront_api_client/api/alert_analytics_api.py @@ -0,0 +1,573 @@ +# coding: utf-8 + +""" + Wavefront REST API Documentation + +The REST API enables you to interact with the Wavefront service by using standard REST API tools. You can use the REST API to automate commonly executed operations, for example to tag sources automatically.
When you make REST API calls outside the REST API documentation UI, to authenticate to the service, you must use an API token associated with a user account or a service account. For information on how to get the API token and examples, see Use the Wavefront REST API.
# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from wavefront_api_client.api_client import ApiClient + + +class AlertAnalyticsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_active_no_target_alert_summary_details(self, start, **kwargs): # noqa: E501 + """Get Active No Target Alert Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_no_target_alert_summary_details(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_active_no_target_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.get_active_no_target_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + return data + + def get_active_no_target_alert_summary_details_with_http_info(self, start, **kwargs): # noqa: E501 + """Get Active No Target Alert Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_no_target_alert_summary_details_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end', 'offset', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_active_no_target_alert_summary_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `get_active_no_target_alert_summary_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + if 'offset' in params: + query_params.append(('offset', params['offset'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/analytics/summary/alerts/noTarget', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerPagedAlertAnalyticsSummaryDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alert_analytics_errors_summary(self, start, **kwargs): # noqa: E501 + """Get Alert Analytics errors summary # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alert_analytics_errors_summary(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :return: ResponseContainerListAlertErrorGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_alert_analytics_errors_summary_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.get_alert_analytics_errors_summary_with_http_info(start, **kwargs) # noqa: E501 + return data + + def get_alert_analytics_errors_summary_with_http_info(self, start, **kwargs): # noqa: E501 + """Get Alert Analytics errors summary # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alert_analytics_errors_summary_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :return: ResponseContainerListAlertErrorGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alert_analytics_errors_summary" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `get_alert_analytics_errors_summary`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/analytics/summary/errors', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerListAlertErrorGroupInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alert_analytics_summary(self, start, **kwargs): # noqa: E501 + """Get Alert Analytics Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alert_analytics_summary(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :return: ResponseContainerAlertAnalyticsSummary + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_alert_analytics_summary_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.get_alert_analytics_summary_with_http_info(start, **kwargs) # noqa: E501 + return data + + def get_alert_analytics_summary_with_http_info(self, start, **kwargs): # noqa: E501 + """Get Alert Analytics Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alert_analytics_summary_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :return: ResponseContainerAlertAnalyticsSummary + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alert_analytics_summary" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `get_alert_analytics_summary`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/analytics/summary', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerAlertAnalyticsSummary', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_failed_alert_summary_details(self, start, **kwargs): # noqa: E501 + """Get Failed Alert Summary Details for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_failed_alert_summary_details(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_failed_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.get_failed_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + return data + + def get_failed_alert_summary_details_with_http_info(self, start, **kwargs): # noqa: E501 + """Get Failed Alert Summary Details for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_failed_alert_summary_details_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end', 'offset', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_failed_alert_summary_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `get_failed_alert_summary_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + if 'offset' in params: + query_params.append(('offset', params['offset'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/analytics/summary/alerts/failed', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerPagedAlertAnalyticsSummaryDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_no_data_alert_summary_details(self, start, **kwargs): # noqa: E501 + """Get No Data Alert Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_no_data_alert_summary_details(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_no_data_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.get_no_data_alert_summary_details_with_http_info(start, **kwargs) # noqa: E501 + return data + + def get_no_data_alert_summary_details_with_http_info(self, start, **kwargs): # noqa: E501 + """Get No Data Alert Summary for a customer # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_no_data_alert_summary_details_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds, null to use now + :param int offset: offset for records + :param int limit: Number of records + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end', 'offset', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_no_data_alert_summary_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `get_no_data_alert_summary_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + if 'offset' in params: + query_params.append(('offset', params['offset'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/analytics/summary/alerts/noData', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerPagedAlertAnalyticsSummaryDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/wavefront_api_client/api/search_api.py b/wavefront_api_client/api/search_api.py index 0faade9..7902fa1 100644 --- a/wavefront_api_client/api/search_api.py +++ b/wavefront_api_client/api/search_api.py @@ -714,6 +714,335 @@ def search_alert_entities_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def search_alert_execution_summary_entities(self, start, **kwargs): # noqa: E501 + """Search over a customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_entities(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param SortableSearchRequest body: + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.search_alert_execution_summary_entities_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.search_alert_execution_summary_entities_with_http_info(start, **kwargs) # noqa: E501 + return data + + def search_alert_execution_summary_entities_with_http_info(self, start, **kwargs): # noqa: E501 + """Search over a customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_entities_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param SortableSearchRequest body: + :return: ResponseContainerPagedAlertAnalyticsSummaryDetail + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method search_alert_execution_summary_entities" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `search_alert_execution_summary_entities`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/search/alert-analytics-summary', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerPagedAlertAnalyticsSummaryDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def search_alert_execution_summary_for_facet(self, facet, start, **kwargs): # noqa: E501 + """Lists the values of a specific facet over the customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_for_facet(facet, start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str facet: (required) + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param FacetSearchRequestContainer body: + :return: ResponseContainerFacetResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.search_alert_execution_summary_for_facet_with_http_info(facet, start, **kwargs) # noqa: E501 + else: + (data) = self.search_alert_execution_summary_for_facet_with_http_info(facet, start, **kwargs) # noqa: E501 + return data + + def search_alert_execution_summary_for_facet_with_http_info(self, facet, start, **kwargs): # noqa: E501 + """Lists the values of a specific facet over the customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_for_facet_with_http_info(facet, start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str facet: (required) + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param FacetSearchRequestContainer body: + :return: ResponseContainerFacetResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['facet', 'start', 'end', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method search_alert_execution_summary_for_facet" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'facet' is set + if self.api_client.client_side_validation and ('facet' not in params or + params['facet'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `facet` when calling `search_alert_execution_summary_for_facet`") # noqa: E501 + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `search_alert_execution_summary_for_facet`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'facet' in params: + path_params['facet'] = params['facet'] # noqa: E501 + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/search/alert-analytics-summary/{facet}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerFacetResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def search_alert_execution_summary_for_facets(self, start, **kwargs): # noqa: E501 + """Lists the values of one or more facets over the customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_for_facets(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param FacetsSearchRequestContainer body: + :return: ResponseContainerFacetsResponseContainer + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.search_alert_execution_summary_for_facets_with_http_info(start, **kwargs) # noqa: E501 + else: + (data) = self.search_alert_execution_summary_for_facets_with_http_info(start, **kwargs) # noqa: E501 + return data + + def search_alert_execution_summary_for_facets_with_http_info(self, start, **kwargs): # noqa: E501 + """Lists the values of one or more facets over the customer's alert executions summaries # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_alert_execution_summary_for_facets_with_http_info(start, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int start: Start time in epoch seconds (required) + :param int end: End time in epoch seconds + :param FacetsSearchRequestContainer body: + :return: ResponseContainerFacetsResponseContainer + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start', 'end', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method search_alert_execution_summary_for_facets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start' is set + if self.api_client.client_side_validation and ('start' not in params or + params['start'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start` when calling `search_alert_execution_summary_for_facets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start' in params: + query_params.append(('start', params['start'])) # noqa: E501 + if 'end' in params: + query_params.append(('end', params['end'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/search/alert-analytics-summary/facets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerFacetsResponseContainer', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def search_alert_for_facet(self, facet, **kwargs): # noqa: E501 """Lists the values of a specific facet over the customer's non-deleted alerts # noqa: E501 diff --git a/wavefront_api_client/api_client.py b/wavefront_api_client/api_client.py index b6fe32e..15a9724 100644 --- a/wavefront_api_client/api_client.py +++ b/wavefront_api_client/api_client.py @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/2.213.0/python' + self.user_agent = 'Swagger-Codegen/2.214.0/python' self.client_side_validation = configuration.client_side_validation def __del__(self): diff --git a/wavefront_api_client/configuration.py b/wavefront_api_client/configuration.py index 48e574b..7780b2a 100644 --- a/wavefront_api_client/configuration.py +++ b/wavefront_api_client/configuration.py @@ -251,5 +251,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v2\n"\ - "SDK Package Version: 2.213.0".\ + "SDK Package Version: 2.214.0".\ format(env=sys.platform, pyversion=sys.version)