All URIs are relative to https://YOUR_INSTANCE.wavefront.com
Method | HTTP request | Description |
---|---|---|
create_ingestion_policy | POST /api/v2/usage/ingestionpolicy | Create a specific ingestion policy |
delete_ingestion_policy | DELETE /api/v2/usage/ingestionpolicy/{id} | Delete a specific ingestion policy |
export_csv | GET /api/v2/usage/exportcsv | Export a CSV report |
get_all_ingestion_policies | GET /api/v2/usage/ingestionpolicy | Get all ingestion policies for a customer |
get_ingestion_policy | GET /api/v2/usage/ingestionpolicy/{id} | Get a specific ingestion policy |
get_ingestion_policy_by_version | GET /api/v2/usage/ingestionpolicy/{id}/history/{version} | Get a specific historical version of a ingestion policy |
get_ingestion_policy_history | GET /api/v2/usage/ingestionpolicy/{id}/history | Get the version history of ingestion policy |
revert_ingestion_policy_by_version | POST /api/v2/usage/ingestionpolicy/{id}/revert/{version} | Revert to a specific historical version of a ingestion policy |
update_ingestion_policy | PUT /api/v2/usage/ingestionpolicy/{id} | Update a specific ingestion policy |
ResponseContainerIngestionPolicyReadModel create_ingestion_policy(body=body)
Create a specific ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
body = wavefront_api_client.IngestionPolicyWriteModel() # IngestionPolicyWriteModel | Example Body: <pre>{ \"name\": \"Ingestion policy name\", \"description\": \"Ingestion policy description\", \"scope\": \"GROUP\", \"groups\": [\"g1\",\"g2\"], \"isLimited\": \"true\", \"limitPPS\": \"1000\", \"alert\": { \"name\": \"Alert Name\", \"targets\": { \"severe\": \"[email protected]\" }, \"conditionPercentages\": { \"info\": 70, \"warn\": 90 }, \"minutes\": 5, \"resolveAfterMinutes\": 2, \"evaluateRealtimeData\": false, \"additionalInformation\": \"Additional Info\", \"tags\": { \"customerTags\": [ \"alertTag1\" ] }, \"conditionsThresholdOperator\": \">\" } }</pre> (optional)
try:
# Create a specific ingestion policy
api_response = api_instance.create_ingestion_policy(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->create_ingestion_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | IngestionPolicyWriteModel | Example Body: <pre>{ "name": "Ingestion policy name", "description": "Ingestion policy description", "scope": "GROUP", "groups": ["g1","g2"], "isLimited": "true", "limitPPS": "1000", "alert": { "name": "Alert Name", "targets": { "severe": "[email protected]" }, "conditionPercentages": { "info": 70, "warn": 90 }, "minutes": 5, "resolveAfterMinutes": 2, "evaluateRealtimeData": false, "additionalInformation": "Additional Info", "tags": { "customerTags": [ "alertTag1" ] }, "conditionsThresholdOperator": ">" } }</pre> | [optional] |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerIngestionPolicyReadModel delete_ingestion_policy(id)
Delete a specific ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Delete a specific ingestion policy
api_response = api_instance.delete_ingestion_policy(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->delete_ingestion_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
export_csv(start_time, end_time=end_time)
Export a CSV report
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.UsageApi(wavefront_api_client.ApiClient(configuration))
start_time = 789 # int | start time in epoch seconds
end_time = 789 # int | end time in epoch seconds, null to use now (optional)
try:
# Export a CSV report
api_instance.export_csv(start_time, end_time=end_time)
except ApiException as e:
print("Exception when calling UsageApi->export_csv: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
start_time | int | start time in epoch seconds | |
end_time | int | end time in epoch seconds, null to use now | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerPagedIngestionPolicyReadModel get_all_ingestion_policies(offset=offset, limit=limit)
Get all ingestion policies for a customer
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.UsageApi(wavefront_api_client.ApiClient(configuration))
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Get all ingestion policies for a customer
api_response = api_instance.get_all_ingestion_policies(offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_all_ingestion_policies: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
offset | int | [optional] [default to 0] | |
limit | int | [optional] [default to 100] |
ResponseContainerPagedIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerIngestionPolicyReadModel get_ingestion_policy(id)
Get a specific ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Get a specific ingestion policy
api_response = api_instance.get_ingestion_policy(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_ingestion_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerIngestionPolicyReadModel get_ingestion_policy_by_version(id, version)
Get a specific historical version of a ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
version = 789 # int |
try:
# Get a specific historical version of a ingestion policy
api_response = api_instance.get_ingestion_policy_by_version(id, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_ingestion_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
version | int |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerHistoryResponse get_ingestion_policy_history(id, offset=offset, limit=limit)
Get the version history of ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Get the version history of ingestion policy
api_response = api_instance.get_ingestion_policy_history(id, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_ingestion_policy_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
offset | int | [optional] [default to 0] | |
limit | int | [optional] [default to 100] |
ResponseContainerHistoryResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerIngestionPolicyReadModel revert_ingestion_policy_by_version(id, version)
Revert to a specific historical version of a ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
version = 789 # int |
try:
# Revert to a specific historical version of a ingestion policy
api_response = api_instance.revert_ingestion_policy_by_version(id, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->revert_ingestion_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
version | int |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerIngestionPolicyReadModel update_ingestion_policy(id, body=body)
Update a specific ingestion policy
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.UsageApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
body = wavefront_api_client.IngestionPolicyWriteModel() # IngestionPolicyWriteModel | Example Body: <pre>{ \"name\": \"Ingestion policy name\", \"description\": \"Ingestion policy description\", \"scope\": \"GROUP\", \"groups\": [\"g1\",\"g2\"], \"isLimited\": \"true\", \"limitPPS\": \"1000\", \"alert\": { \"name\": \"Alert Name\", \"targets\": { \"severe\": \"[email protected]\" }, \"conditionPercentages\": { \"info\": 70, \"warn\": 90 }, \"minutes\": 5, \"resolveAfterMinutes\": 2, \"evaluateRealtimeData\": false, \"additionalInformation\": \"Additional Info\", \"tags\": { \"customerTags\": [ \"alertTag1\" ] }, \"conditionsThresholdOperator\": \">\" } }</pre> (optional)
try:
# Update a specific ingestion policy
api_response = api_instance.update_ingestion_policy(id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->update_ingestion_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
body | IngestionPolicyWriteModel | Example Body: <pre>{ "name": "Ingestion policy name", "description": "Ingestion policy description", "scope": "GROUP", "groups": ["g1","g2"], "isLimited": "true", "limitPPS": "1000", "alert": { "name": "Alert Name", "targets": { "severe": "[email protected]" }, "conditionPercentages": { "info": 70, "warn": 90 }, "minutes": 5, "resolveAfterMinutes": 2, "evaluateRealtimeData": false, "additionalInformation": "Additional Info", "tags": { "customerTags": [ "alertTag1" ] }, "conditionsThresholdOperator": ">" } }</pre> | [optional] |
ResponseContainerIngestionPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]