Skip to content

akodali18/python-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wavefront API Client

The Wavefront API allows you to perform various operations in Wavefront. The API can be used to automate commonly executed operations such as tagging sources automatically, sending events, and more.

This Python package is automatically generated by the Swagger Codegen project.

  • Wavefront API version: 2

If you're looking for the V1 API, the API client can be found in the api-v1 branch of this repository.

Requirements

  • Python 2.7 or higher
  • OpenSSL 1.0.1 or higher (TLSv1.2 support)

Note ("[Errno 54] Connection reset by peer" error): This is a known issue affecting Python 2.7 on most Macs. macOS ships with an outdated version of the OpenSSL library that only supports deprecated encryption protocols. As a result, Python 2.7 that ships with the system, doesn't support TLSv1.2. During SSL handshake it attempts to use TLSv1 encryption protocol, which is no longer considered secure, and Wavefront servers are terminating the connection, which results in a "Connection reset by peer" error. To work around this issue, the easiest way would be to install an updated version of Python 2.7 using Homebrew (https://brew.sh), which doesn't rely on the system-provided OpenSSL library, or switch to Python 3.

Note: v2.2.x libraries require a minor code modification to be compatible with v2.1.x and earlier versions due to breaking changes introduced by swagger-codegen. Before:

client = wave_api.ApiClient(host=base_url, header_name='Authorization', header_value='Bearer ' + api_key)

After:

config = wave_api.Configuration()
config.host = base_url
client = wave_api.ApiClient(configuration=config, header_name='Authorization', header_value='Bearer ' + api_key)

Setuptools

You can install the bindings via Setuptools.

python setup.py install

Or you can install from Github via pip:

pip install git+https://github.com/wavefronthq/python-client.git

Or you can install from PyPi via pip:

pip install wavefront-api-client

To use the bindings, import the package:

import wavefront_api_client

Manual Installation

If you do not want to use Setuptools, you can download the latest release. Then, to use the bindings, import the package:

import path.to.wavefront_api_client

Getting Started

All API endpoints are documented at https://YOUR_INSTANCE.wavefront.com/api-docs/ui/. Below is a simple example demonstrating how to use the library to call the Source API. You can use this example as a starting point.

import wavefront_api_client as wave_api

base_url = 'https://YOUR_INSTANCE.wavefront.com'
api_key = 'YOUR_API_TOKEN'

config = wave_api.Configuration()
config.host = base_url
client = wave_api.ApiClient(configuration=config, header_name='Authorization', header_value='Bearer ' + api_key)

# instantiate source API
source_api = wave_api.SourceApi(client)
sources = source_api.get_all_source()
print sources

Troubleshooting

If you encounter a bug or need help, feel free to leave an issue on this GitHub repository.

Documentation for API Endpoints

Class Method HTTP request Description
AlertApi add_alert_tag PUT /api/v2/alert/{id}/tag/{tagValue} Add a tag to a specific alert
AlertApi create_alert POST /api/v2/alert Create a specific alert
AlertApi delete_alert DELETE /api/v2/alert/{id} Delete a specific alert
AlertApi get_alert GET /api/v2/alert/{id} Get a specific alert
AlertApi get_alert_history GET /api/v2/alert/{id}/history Get the version history of a specific alert
AlertApi get_alert_tags GET /api/v2/alert/{id}/tag Get all tags associated with a specific alert
AlertApi get_alert_version GET /api/v2/alert/{id}/history/{version} Get a specific historical version of a specific alert
AlertApi get_alerts_summary GET /api/v2/alert/summary Count alerts of various statuses for a customer
AlertApi get_all_alert GET /api/v2/alert Get all alerts for a customer
AlertApi remove_alert_tag DELETE /api/v2/alert/{id}/tag/{tagValue} Remove a tag from a specific alert
AlertApi set_alert_tags POST /api/v2/alert/{id}/tag Set all tags associated with a specific alert
AlertApi snooze_alert POST /api/v2/alert/{id}/snooze Snooze a specific alert for some number of seconds
AlertApi undelete_alert POST /api/v2/alert/{id}/undelete Undelete a specific alert
AlertApi unsnooze_alert POST /api/v2/alert/{id}/unsnooze Unsnooze a specific alert
AlertApi update_alert PUT /api/v2/alert/{id} Update a specific alert
CloudIntegrationApi create_cloud_integration POST /api/v2/cloudintegration Create a cloud integration
CloudIntegrationApi delete_cloud_integration DELETE /api/v2/cloudintegration/{id} Delete a specific cloud integration
CloudIntegrationApi disable_cloud_integration POST /api/v2/cloudintegration/{id}/disable Disable a specific cloud integration
CloudIntegrationApi enable_cloud_integration POST /api/v2/cloudintegration/{id}/enable Enable a specific cloud integration
CloudIntegrationApi get_all_cloud_integration GET /api/v2/cloudintegration Get all cloud integrations for a customer
CloudIntegrationApi get_cloud_integration GET /api/v2/cloudintegration/{id} Get a specific cloud integration
CloudIntegrationApi undelete_cloud_integration POST /api/v2/cloudintegration/{id}/undelete Undelete a specific cloud integration
CloudIntegrationApi update_cloud_integration PUT /api/v2/cloudintegration/{id} Update a specific cloud integration
DashboardApi add_dashboard_tag PUT /api/v2/dashboard/{id}/tag/{tagValue} Add a tag to a specific dashboard
DashboardApi create_dashboard POST /api/v2/dashboard Create a specific dashboard
DashboardApi delete_dashboard DELETE /api/v2/dashboard/{id} Delete a specific dashboard
DashboardApi get_all_dashboard GET /api/v2/dashboard Get all dashboards for a customer
DashboardApi get_dashboard GET /api/v2/dashboard/{id} Get a specific dashboard
DashboardApi get_dashboard_history GET /api/v2/dashboard/{id}/history Get the version history of a specific dashboard
DashboardApi get_dashboard_tags GET /api/v2/dashboard/{id}/tag Get all tags associated with a specific dashboard
DashboardApi get_dashboard_version GET /api/v2/dashboard/{id}/history/{version} Get a specific version of a specific dashboard
DashboardApi remove_dashboard_tag DELETE /api/v2/dashboard/{id}/tag/{tagValue} Remove a tag from a specific dashboard
DashboardApi set_dashboard_tags POST /api/v2/dashboard/{id}/tag Set all tags associated with a specific dashboard
DashboardApi undelete_dashboard POST /api/v2/dashboard/{id}/undelete Undelete a specific dashboard
DashboardApi update_dashboard PUT /api/v2/dashboard/{id} Update a specific dashboard
DerivedMetricDefinitionApi add_tag_to_derived_metric_definition PUT /api/v2/derivedmetricdefinition/{id}/tag/{tagValue} Add a tag to a specific Derived Metric Definition
DerivedMetricDefinitionApi create_derived_metric_definition POST /api/v2/derivedmetricdefinition Create a specific derived metric definition
DerivedMetricDefinitionApi delete_derived_metric_definition DELETE /api/v2/derivedmetricdefinition/{id} Delete a specific derived metric definition
DerivedMetricDefinitionApi get_all_derived_metric_definitions GET /api/v2/derivedmetricdefinition Get all derived metric definitions for a customer
DerivedMetricDefinitionApi get_derived_metric_definition_by_version GET /api/v2/derivedmetricdefinition/{id}/history/{version} Get a specific historical version of a specific derived metric definition
DerivedMetricDefinitionApi get_derived_metric_definition_history GET /api/v2/derivedmetricdefinition/{id}/history Get the version history of a specific derived metric definition
DerivedMetricDefinitionApi get_derived_metric_definition_tags GET /api/v2/derivedmetricdefinition/{id}/tag Get all tags associated with a specific derived metric definition
DerivedMetricDefinitionApi get_registered_query GET /api/v2/derivedmetricdefinition/{id} Get a specific registered query
DerivedMetricDefinitionApi remove_tag_from_derived_metric_definition DELETE /api/v2/derivedmetricdefinition/{id}/tag/{tagValue} Remove a tag from a specific Derived Metric Definition
DerivedMetricDefinitionApi set_derived_metric_definition_tags POST /api/v2/derivedmetricdefinition/{id}/tag Set all tags associated with a specific derived metric definition
DerivedMetricDefinitionApi undelete_derived_metric_definition POST /api/v2/derivedmetricdefinition/{id}/undelete Undelete a specific derived metric definition
DerivedMetricDefinitionApi update_derived_metric_definition PUT /api/v2/derivedmetricdefinition/{id} Update a specific derived metric definition
EventApi add_event_tag PUT /api/v2/event/{id}/tag/{tagValue} Add a tag to a specific event
EventApi close_event POST /api/v2/event/{id}/close Close a specific event
EventApi create_event POST /api/v2/event Create a specific event
EventApi delete_event DELETE /api/v2/event/{id} Delete a specific event
EventApi get_all_events_with_time_range GET /api/v2/event List all the events for a customer within a time range
EventApi get_event GET /api/v2/event/{id} Get a specific event
EventApi get_event_tags GET /api/v2/event/{id}/tag Get all tags associated with a specific event
EventApi remove_event_tag DELETE /api/v2/event/{id}/tag/{tagValue} Remove a tag from a specific event
EventApi set_event_tags POST /api/v2/event/{id}/tag Set all tags associated with a specific event
EventApi update_event PUT /api/v2/event/{id} Update a specific event
ExternalLinkApi create_external_link POST /api/v2/extlink Create a specific external link
ExternalLinkApi delete_external_link DELETE /api/v2/extlink/{id} Delete a specific external link
ExternalLinkApi get_all_external_link GET /api/v2/extlink Get all external links for a customer
ExternalLinkApi get_external_link GET /api/v2/extlink/{id} Get a specific external link
ExternalLinkApi update_external_link PUT /api/v2/extlink/{id} Update a specific external link
IntegrationApi get_all_integration GET /api/v2/integration Gets a flat list of all Wavefront integrations available, along with their status
IntegrationApi get_all_integration_in_manifests GET /api/v2/integration/manifests Gets all Wavefront integrations as structured in their integration manifests, along with their status
IntegrationApi get_all_integration_statuses GET /api/v2/integration/status Gets the status of all Wavefront integrations
IntegrationApi get_integration GET /api/v2/integration/{id} Gets a single Wavefront integration by its id, along with its status
IntegrationApi get_integration_status GET /api/v2/integration/{id}/status Gets the status of a single Wavefront integration
IntegrationApi install_integration POST /api/v2/integration/{id}/install Installs a Wavefront integration
IntegrationApi uninstall_integration POST /api/v2/integration/{id}/uninstall Uninstalls a Wavefront integration
MaintenanceWindowApi create_maintenance_window POST /api/v2/maintenancewindow Create a maintenance window
MaintenanceWindowApi delete_maintenance_window DELETE /api/v2/maintenancewindow/{id} Delete a specific maintenance window
MaintenanceWindowApi get_all_maintenance_window GET /api/v2/maintenancewindow Get all maintenance windows for a customer
MaintenanceWindowApi get_maintenance_window GET /api/v2/maintenancewindow/{id} Get a specific maintenance window
MaintenanceWindowApi update_maintenance_window PUT /api/v2/maintenancewindow/{id} Update a specific maintenance window
MessageApi user_get_messages GET /api/v2/message Gets messages applicable to the current user, i.e. within time range and distribution scope
MessageApi user_read_message POST /api/v2/message/{id}/read Mark a specific message as read
MetricApi get_metric_details GET /api/v2/chart/metric/detail Get more details on a metric, including reporting sources and approximate last time reported
NotificantApi create_notificant POST /api/v2/notificant Create a notification target
NotificantApi delete_notificant DELETE /api/v2/notificant/{id} Delete a specific notification target
NotificantApi get_all_notificants GET /api/v2/notificant Get all notification targets for a customer
NotificantApi get_notificant GET /api/v2/notificant/{id} Get a specific notification target
NotificantApi test_notificant POST /api/v2/notificant/test/{id} Test a specific notification target
NotificantApi update_notificant PUT /api/v2/notificant/{id} Update a specific notification target
ProxyApi delete_proxy DELETE /api/v2/proxy/{id} Delete a specific proxy
ProxyApi get_all_proxy GET /api/v2/proxy Get all proxies for a customer
ProxyApi get_proxy GET /api/v2/proxy/{id} Get a specific proxy
ProxyApi undelete_proxy POST /api/v2/proxy/{id}/undelete Undelete a specific proxy
ProxyApi update_proxy PUT /api/v2/proxy/{id} Update the name of a specific proxy
QueryApi query_api GET /api/v2/chart/api Perform a charting query against Wavefront servers that returns the appropriate points in the specified time window and granularity
QueryApi query_raw GET /api/v2/chart/raw Perform a raw data query against Wavefront servers that returns second granularity points grouped by tags
SavedSearchApi create_saved_search POST /api/v2/savedsearch Create a saved search
SavedSearchApi delete_saved_search DELETE /api/v2/savedsearch/{id} Delete a specific saved search
SavedSearchApi get_all_entity_type_saved_searches GET /api/v2/savedsearch/type/{entitytype} Get all saved searches for a specific entity type for a user
SavedSearchApi get_all_saved_searches GET /api/v2/savedsearch Get all saved searches for a user
SavedSearchApi get_saved_search GET /api/v2/savedsearch/{id} Get a specific saved search
SavedSearchApi update_saved_search PUT /api/v2/savedsearch/{id} Update a specific saved search
SearchApi search_alert_deleted_entities POST /api/v2/search/alert/deleted Search over a customer's deleted alerts
SearchApi 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 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 POST /api/v2/search/alert Search over a customer's non-deleted alerts
SearchApi 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 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 POST /api/v2/search/cloudintegration/deleted Search over a customer's deleted cloud integrations
SearchApi search_cloud_integration_deleted_for_facet POST /api/v2/search/cloudintegration/deleted/{facet} Lists the values of a specific facet over the customer's deleted cloud integrations
SearchApi search_cloud_integration_deleted_for_facets POST /api/v2/search/cloudintegration/deleted/facets Lists the values of one or more facets over the customer's deleted cloud integrations
SearchApi search_cloud_integration_entities POST /api/v2/search/cloudintegration Search over a customer's non-deleted cloud integrations
SearchApi search_cloud_integration_for_facet POST /api/v2/search/cloudintegration/{facet} Lists the values of a specific facet over the customer's non-deleted cloud integrations
SearchApi search_cloud_integration_for_facets POST /api/v2/search/cloudintegration/facets Lists the values of one or more facets over the customer's non-deleted cloud integrations
SearchApi search_dashboard_deleted_entities POST /api/v2/search/dashboard/deleted Search over a customer's deleted dashboards
SearchApi search_dashboard_deleted_for_facet POST /api/v2/search/dashboard/deleted/{facet} Lists the values of a specific facet over the customer's deleted dashboards
SearchApi search_dashboard_deleted_for_facets POST /api/v2/search/dashboard/deleted/facets Lists the values of one or more facets over the customer's deleted dashboards
SearchApi search_dashboard_entities POST /api/v2/search/dashboard Search over a customer's non-deleted dashboards
SearchApi search_dashboard_for_facet POST /api/v2/search/dashboard/{facet} Lists the values of a specific facet over the customer's non-deleted dashboards
SearchApi search_dashboard_for_facets POST /api/v2/search/dashboard/facets Lists the values of one or more facets over the customer's non-deleted dashboards
SearchApi search_external_link_entities POST /api/v2/search/extlink Search over a customer's external links
SearchApi search_external_links_for_facet POST /api/v2/search/extlink/{facet} Lists the values of a specific facet over the customer's external links
SearchApi search_external_links_for_facets POST /api/v2/search/extlink/facets Lists the values of one or more facets over the customer's external links
SearchApi search_maintenance_window_entities POST /api/v2/search/maintenancewindow Search over a customer's maintenance windows
SearchApi search_maintenance_window_for_facet POST /api/v2/search/maintenancewindow/{facet} Lists the values of a specific facet over the customer's maintenance windows
SearchApi search_maintenance_window_for_facets POST /api/v2/search/maintenancewindow/facets Lists the values of one or more facets over the customer's maintenance windows
SearchApi search_notficant_for_facets POST /api/v2/search/notificant/facets Lists the values of one or more facets over the customer's notificants
SearchApi search_notificant_entities POST /api/v2/search/notificant Search over a customer's notificants
SearchApi search_notificant_for_facet POST /api/v2/search/notificant/{facet} Lists the values of a specific facet over the customer's notificants
SearchApi search_proxy_deleted_entities POST /api/v2/search/proxy/deleted Search over a customer's deleted proxies
SearchApi search_proxy_deleted_for_facet POST /api/v2/search/proxy/deleted/{facet} Lists the values of a specific facet over the customer's deleted proxies
SearchApi search_proxy_deleted_for_facets POST /api/v2/search/proxy/deleted/facets Lists the values of one or more facets over the customer's deleted proxies
SearchApi search_proxy_entities POST /api/v2/search/proxy Search over a customer's non-deleted proxies
SearchApi search_proxy_for_facet POST /api/v2/search/proxy/{facet} Lists the values of a specific facet over the customer's non-deleted proxies
SearchApi search_proxy_for_facets POST /api/v2/search/proxy/facets Lists the values of one or more facets over the customer's non-deleted proxies
SearchApi search_registered_query_deleted_entities POST /api/v2/search/derivedmetricdefinition/deleted Search over a customer's deleted derived metric definitions
SearchApi search_registered_query_deleted_for_facet POST /api/v2/search/derivedmetricdefinition/deleted/{facet} Lists the values of a specific facet over the customer's deleted derived metric definitions
SearchApi search_registered_query_deleted_for_facets POST /api/v2/search/derivedmetricdefinition/deleted/facets Lists the values of one or more facets over the customer's deleted derived metric definitions
SearchApi search_registered_query_entities POST /api/v2/search/derivedmetricdefinition Search over a customer's non-deleted derived metric definitions
SearchApi search_registered_query_for_facet POST /api/v2/search/derivedmetricdefinition/{facet} Lists the values of a specific facet over the customer's non-deleted derived metric definitions
SearchApi search_registered_query_for_facets POST /api/v2/search/derivedmetricdefinition/facets Lists the values of one or more facets over the customer's non-deleted derived metric definition
SearchApi search_report_event_entities POST /api/v2/search/event Search over a customer's events
SearchApi search_report_event_for_facet POST /api/v2/search/event/{facet} Lists the values of a specific facet over the customer's events
SearchApi search_report_event_for_facets POST /api/v2/search/event/facets Lists the values of one or more facets over the customer's events
SearchApi search_tagged_source_entities POST /api/v2/search/source Search over a customer's sources
SearchApi search_tagged_source_for_facet POST /api/v2/search/source/{facet} Lists the values of a specific facet over the customer's sources
SearchApi search_tagged_source_for_facets POST /api/v2/search/source/facets Lists the values of one or more facets over the customer's sources
SearchApi search_user_entities POST /api/v2/search/user Search over a customer's users
SearchApi search_user_for_facet POST /api/v2/search/user/{facet} Lists the values of a specific facet over the customer's users
SearchApi search_user_for_facets POST /api/v2/search/user/facets Lists the values of one or more facets over the customer's users
SearchApi search_web_hook_entities POST /api/v2/search/webhook Search over a customer's webhooks
SearchApi search_web_hook_for_facet POST /api/v2/search/webhook/{facet} Lists the values of a specific facet over the customer's webhooks
SearchApi search_webhook_for_facets POST /api/v2/search/webhook/facets Lists the values of one or more facets over the customer's webhooks
SourceApi add_source_tag PUT /api/v2/source/{id}/tag/{tagValue} Add a tag to a specific source
SourceApi create_source POST /api/v2/source Create metadata (description or tags) for a specific source
SourceApi delete_source DELETE /api/v2/source/{id} Delete metadata (description and tags) for a specific source
SourceApi get_all_source GET /api/v2/source Get all sources for a customer
SourceApi get_source GET /api/v2/source/{id} Get a specific source for a customer
SourceApi get_source_tags GET /api/v2/source/{id}/tag Get all tags associated with a specific source
SourceApi remove_description DELETE /api/v2/source/{id}/description Remove description from a specific source
SourceApi remove_source_tag DELETE /api/v2/source/{id}/tag/{tagValue} Remove a tag from a specific source
SourceApi set_description POST /api/v2/source/{id}/description Set description associated with a specific source
SourceApi set_source_tags POST /api/v2/source/{id}/tag Set all tags associated with a specific source
SourceApi update_source PUT /api/v2/source/{id} Update metadata (description or tags) for a specific source.
UserApi create_or_update_user POST /api/v2/user Creates or updates a user
UserApi delete_user DELETE /api/v2/user/{id} Deletes a user identified by id
UserApi get_all_user GET /api/v2/user Get all users
UserApi get_user GET /api/v2/user/{id} Retrieves a user by identifier (email addr)
UserApi grant_user_permission POST /api/v2/user/{id}/grant Grants a specific user permission
UserApi revoke_user_permission POST /api/v2/user/{id}/revoke Revokes a specific user permission
WebhookApi create_webhook POST /api/v2/webhook Create a specific webhook
WebhookApi delete_webhook DELETE /api/v2/webhook/{id} Delete a specific webhook
WebhookApi get_all_webhooks GET /api/v2/webhook Get all webhooks for a customer
WebhookApi get_webhook GET /api/v2/webhook/{id} Get a specific webhook
WebhookApi update_webhook PUT /api/v2/webhook/{id} Update a specific webhook

Documentation For Models

About

Python client for working with Wavefront

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%