All URIs are relative to https://localhost
| Method | HTTP request | Description |
|---|---|---|
| create_webhook | POST /api/v2/webhook | Create a specific webhook |
| delete_webhook | DELETE /api/v2/webhook/{id} | Delete a specific webhook |
| get_all_webhooks | GET /api/v2/webhook | Get all webhooks for a customer |
| get_webhook | GET /api/v2/webhook/{id} | Get a specific webhook |
| update_webhook | PUT /api/v2/webhook/{id} | Update a specific webhook |
ResponseContainerNotificant create_webhook(body=body)
Create a specific webhook
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.WebhookApi(wavefront_api_client.ApiClient(configuration))
body = wavefront_api_client.Notificant() # Notificant | Example Body: <pre>{ \"description\": \"WebHook Description\", \"template\": \"POST Body -- Mustache syntax\", \"title\": \"WebHook Title\", \"triggers\": [ \"ALERT_OPENED\" ], \"recipient\": \"http://example.com\", \"customHttpHeaders\": {}, \"contentType\": \"text/plain\" }</pre> (optional)
try:
# Create a specific webhook
api_response = api_instance.create_webhook(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->create_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | Notificant | Example Body: <pre>{ "description": "WebHook Description", "template": "POST Body -- Mustache syntax", "title": "WebHook Title", "triggers": [ "ALERT_OPENED" ], "recipient": "http://example.com\", "customHttpHeaders": {}, "contentType": "text/plain" }</pre> | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerNotificant delete_webhook(id)
Delete a specific webhook
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.WebhookApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Delete a specific webhook
api_response = api_instance.delete_webhook(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->delete_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerPagedNotificant get_all_webhooks(offset=offset, limit=limit)
Get all webhooks 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.WebhookApi(wavefront_api_client.ApiClient(configuration))
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Get all webhooks for a customer
api_response = api_instance.get_all_webhooks(offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->get_all_webhooks: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| offset | int | [optional] [default to 0] | |
| limit | int | [optional] [default to 100] |
ResponseContainerPagedNotificant
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerNotificant get_webhook(id)
Get a specific webhook
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.WebhookApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Get a specific webhook
api_response = api_instance.get_webhook(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->get_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseContainerNotificant update_webhook(id, body=body)
Update a specific webhook
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.WebhookApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
body = wavefront_api_client.Notificant() # Notificant | Example Body: <pre>{ \"description\": \"WebHook Description\", \"template\": \"POST Body -- Mustache syntax\", \"title\": \"WebHook Title\", \"triggers\": [ \"ALERT_OPENED\" ], \"recipient\": \"http://example.com\", \"customHttpHeaders\": {}, \"contentType\": \"text/plain\" }</pre> (optional)
try:
# Update a specific webhook
api_response = api_instance.update_webhook(id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->update_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| body | Notificant | Example Body: <pre>{ "description": "WebHook Description", "template": "POST Body -- Mustache syntax", "title": "WebHook Title", "triggers": [ "ALERT_OPENED" ], "recipient": "http://example.com\", "customHttpHeaders": {}, "contentType": "text/plain" }</pre> | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]