All URIs are relative to https://YOUR_INSTANCE.wavefront.com
Method | HTTP request | Description |
---|---|---|
get_metrics_policy | GET /api/v2/metricspolicy | Get the metrics policy |
get_metrics_policy_by_version | GET /api/v2/metricspolicy/history/{version} | Get a specific historical version of a metrics policy |
get_metrics_policy_history | GET /api/v2/metricspolicy/history | Get the version history of metrics policy |
get_security_policy | GET /api/v2/securitypolicy/{type} | Get the security policy |
get_security_policy_by_version | GET /api/v2/securitypolicy/{type}/history/{version} | Get a specific historical version of a security policy |
get_security_policy_history | GET /api/v2/securitypolicy/{type}/history | Get the version history of security policy |
revert_metrics_policy_by_version | POST /api/v2/metricspolicy/revert/{version} | Revert to a specific historical version of a metrics policy |
revert_security_policy_by_version | POST /api/v2/securitypolicy/{type}/revert/{version} | Revert to a specific historical version of a security policy |
update_metrics_policy | PUT /api/v2/metricspolicy | Update the metrics policy |
update_security_policy | PUT /api/v2/securitypolicy/{type} | Update the security policy |
ResponseContainerMetricsPolicyReadModel get_metrics_policy()
Get the metrics 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
try:
# Get the metrics policy
api_response = api_instance.get_metrics_policy()
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_metrics_policy: %s\n" % e)
This endpoint does not need any parameter.
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerMetricsPolicyReadModel get_metrics_policy_by_version(version)
Get a specific historical version of a metrics 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
version = 789 # int |
try:
# Get a specific historical version of a metrics policy
api_response = api_instance.get_metrics_policy_by_version(version)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_metrics_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
version | int |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerHistoryResponse get_metrics_policy_history(offset=offset, limit=limit)
Get the version history of metrics 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Get the version history of metrics policy
api_response = api_instance.get_metrics_policy_history(offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_metrics_policy_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
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]
ResponseContainerMetricsPolicyReadModel get_security_policy(type)
Get the security 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
type = 'type_example' # str |
try:
# Get the security policy
api_response = api_instance.get_security_policy(type)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_security_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerMetricsPolicyReadModel get_security_policy_by_version(type, version)
Get a specific historical version of a security 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
type = 'type_example' # str |
version = 789 # int |
try:
# Get a specific historical version of a security policy
api_response = api_instance.get_security_policy_by_version(type, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_security_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | ||
version | int |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerHistoryResponse get_security_policy_history(type, offset=offset, limit=limit)
Get the version history of security 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
type = 'type_example' # str |
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Get the version history of security policy
api_response = api_instance.get_security_policy_history(type, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->get_security_policy_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | 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]
ResponseContainerMetricsPolicyReadModel revert_metrics_policy_by_version(version)
Revert to a specific historical version of a metrics 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
version = 789 # int |
try:
# Revert to a specific historical version of a metrics policy
api_response = api_instance.revert_metrics_policy_by_version(version)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->revert_metrics_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
version | int |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerMetricsPolicyReadModel revert_security_policy_by_version(type, version)
Revert to a specific historical version of a security 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
type = 'type_example' # str |
version = 789 # int |
try:
# Revert to a specific historical version of a security policy
api_response = api_instance.revert_security_policy_by_version(type, version)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->revert_security_policy_by_version: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | ||
version | int |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerMetricsPolicyReadModel update_metrics_policy(body=body)
Update the metrics 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
body = wavefront_api_client.MetricsPolicyWriteModel() # MetricsPolicyWriteModel | Example Body: <pre>{ \"policyRules\": [{ \"name\": \"Policy rule1 name\", \"description\": \"Policy rule1 description\", \"prefixes\": [\"revenue.*\"], \"tags\": [{\"key\":\"sensitive\", \"value\":\"false\"}, {\"key\":\"source\", \"value\":\"app1\"}], \"tagsAnded\": \"true\", \"accessType\": \"ALLOW\", \"accounts\": [\"accountId1\", \"accountId2\"], \"userGroups\": [\"userGroupId1\"], \"roles\": [\"roleId\"] }, { \"name\": \"Policy rule2 name\", \"description\": \"Policy rule2 description\", \"prefixes\": [\"revenue.*\"], \"accessType\": \"BLOCK\", \"accounts\": [\"accountId3\"], \"userGroups\": [\"userGroupId1\"] }] }</pre> (optional)
try:
# Update the metrics policy
api_response = api_instance.update_metrics_policy(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->update_metrics_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | MetricsPolicyWriteModel | Example Body: <pre>{ "policyRules": [{ "name": "Policy rule1 name", "description": "Policy rule1 description", "prefixes": ["revenue."], "tags": [{"key":"sensitive", "value":"false"}, {"key":"source", "value":"app1"}], "tagsAnded": "true", "accessType": "ALLOW", "accounts": ["accountId1", "accountId2"], "userGroups": ["userGroupId1"], "roles": ["roleId"] }, { "name": "Policy rule2 name", "description": "Policy rule2 description", "prefixes": ["revenue."], "accessType": "BLOCK", "accounts": ["accountId3"], "userGroups": ["userGroupId1"] }] }</pre> | [optional] |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerMetricsPolicyReadModel update_security_policy(type, body=body)
Update the security 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.SecurityPolicyApi(wavefront_api_client.ApiClient(configuration))
type = 'type_example' # str |
body = wavefront_api_client.MetricsPolicyWriteModel() # MetricsPolicyWriteModel | Example Body: <pre>{ \"policyRules\": [{ \"name\": \"Policy rule1 name\", \"description\": \"Policy rule1 description\", \"prefixes\": [\"revenue.*\"], \"tags\": [{\"key\":\"sensitive\", \"value\":\"false\"}, {\"key\":\"source\", \"value\":\"app1\"}], \"tagsAnded\": \"true\", \"accessType\": \"ALLOW\", \"accounts\": [\"accountId1\", \"accountId2\"], \"userGroups\": [\"userGroupId1\"], \"roles\": [\"roleId\"] }, { \"name\": \"Policy rule2 name\", \"description\": \"Policy rule2 description\", \"prefixes\": [\"revenue.*\"], \"accessType\": \"BLOCK\", \"accounts\": [\"accountId3\"], \"userGroups\": [\"userGroupId1\"] }] }</pre> (optional)
try:
# Update the security policy
api_response = api_instance.update_security_policy(type, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityPolicyApi->update_security_policy: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | ||
body | MetricsPolicyWriteModel | Example Body: <pre>{ "policyRules": [{ "name": "Policy rule1 name", "description": "Policy rule1 description", "prefixes": ["revenue."], "tags": [{"key":"sensitive", "value":"false"}, {"key":"source", "value":"app1"}], "tagsAnded": "true", "accessType": "ALLOW", "accounts": ["accountId1", "accountId2"], "userGroups": ["userGroupId1"], "roles": ["roleId"] }, { "name": "Policy rule2 name", "description": "Policy rule2 description", "prefixes": ["revenue."], "accessType": "BLOCK", "accounts": ["accountId3"], "userGroups": ["userGroupId1"] }] }</pre> | [optional] |
ResponseContainerMetricsPolicyReadModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]