All URIs are relative to https://app.hydrozen.io/api
| Method | HTTP request | Description |
|---|---|---|
| notification_handler_get | GET /notification-handler | Retrieve all notification handlers |
| notification_handler_notification_handler_id_get | GET /notification-handler/{notification_handler_id} | Retrieve one notification handler |
| notification_handlers_notification_handler_id_delete | DELETE /notification-handlers/{notification_handler_id} | Delete notification handler |
| notification_handlers_notification_handler_id_post | POST /notification-handlers/{notification_handler_id} | Update notification handler |
| notification_handlers_post | POST /notification-handlers | Create notification handler |
NotificationHandlerGet200Response notification_handler_get(page=page, results_per_page=results_per_page)
Retrieve all notification handlers
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.notification_handler_get200_response import NotificationHandlerGet200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.hydrozen.io/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.NotificationHandlersApi(api_client)
page = 56 # int | (optional)
results_per_page = 56 # int | (optional)
try:
# Retrieve all notification handlers
api_response = api_instance.notification_handler_get(page=page, results_per_page=results_per_page)
print("The response of NotificationHandlersApi->notification_handler_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationHandlersApi->notification_handler_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | [optional] | |
| results_per_page | int | [optional] |
NotificationHandlerGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of notification handlers | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NotificationHandlerNotificationHandlerIdGet200Response notification_handler_notification_handler_id_get(notification_handler_id)
Retrieve one notification handler
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.notification_handler_notification_handler_id_get200_response import NotificationHandlerNotificationHandlerIdGet200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.hydrozen.io/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.NotificationHandlersApi(api_client)
notification_handler_id = 56 # int |
try:
# Retrieve one notification handler
api_response = api_instance.notification_handler_notification_handler_id_get(notification_handler_id)
print("The response of NotificationHandlersApi->notification_handler_notification_handler_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationHandlersApi->notification_handler_notification_handler_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| notification_handler_id | int |
NotificationHandlerNotificationHandlerIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Notification handler details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
notification_handlers_notification_handler_id_delete(notification_handler_id)
Delete notification handler
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.hydrozen.io/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.NotificationHandlersApi(api_client)
notification_handler_id = 56 # int |
try:
# Delete notification handler
api_instance.notification_handlers_notification_handler_id_delete(notification_handler_id)
except Exception as e:
print("Exception when calling NotificationHandlersApi->notification_handlers_notification_handler_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| notification_handler_id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Notification handler deleted successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorsPost201Response notification_handlers_notification_handler_id_post(notification_handler_id, name=name, type=type, email=email, webhook=webhook, squadcast=squadcast, googlechat=googlechat, slack=slack, discord=discord, telegram=telegram, telegram_chat_id=telegram_chat_id, is_enabled=is_enabled)
Update notification handler
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.monitors_post201_response import MonitorsPost201Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.hydrozen.io/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.NotificationHandlersApi(api_client)
notification_handler_id = 56 # int |
name = 'name_example' # str | (optional)
type = 'type_example' # str | (optional)
email = 'email_example' # str | (optional)
webhook = 'webhook_example' # str | (optional)
squadcast = 'squadcast_example' # str | (optional)
googlechat = 'googlechat_example' # str | (optional)
slack = 'slack_example' # str | (optional)
discord = 'discord_example' # str | (optional)
telegram = 'telegram_example' # str | (optional)
telegram_chat_id = 'telegram_chat_id_example' # str | (optional)
is_enabled = True # bool | (optional)
try:
# Update notification handler
api_response = api_instance.notification_handlers_notification_handler_id_post(notification_handler_id, name=name, type=type, email=email, webhook=webhook, squadcast=squadcast, googlechat=googlechat, slack=slack, discord=discord, telegram=telegram, telegram_chat_id=telegram_chat_id, is_enabled=is_enabled)
print("The response of NotificationHandlersApi->notification_handlers_notification_handler_id_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationHandlersApi->notification_handlers_notification_handler_id_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| notification_handler_id | int | ||
| name | str | [optional] | |
| type | str | [optional] | |
| str | [optional] | ||
| webhook | str | [optional] | |
| squadcast | str | [optional] | |
| googlechat | str | [optional] | |
| slack | str | [optional] | |
| discord | str | [optional] | |
| telegram | str | [optional] | |
| telegram_chat_id | str | [optional] | |
| is_enabled | bool | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Notification handler updated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorsPost201Response notification_handlers_post(name, type, email=email, webhook=webhook, squadcast=squadcast, googlechat=googlechat, slack=slack, discord=discord, telegram=telegram, telegram_chat_id=telegram_chat_id, is_enabled=is_enabled)
Create notification handler
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.monitors_post201_response import MonitorsPost201Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.hydrozen.io/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.NotificationHandlersApi(api_client)
name = 'name_example' # str |
type = 'type_example' # str |
email = 'email_example' # str | (optional)
webhook = 'webhook_example' # str | (optional)
squadcast = 'squadcast_example' # str | (optional)
googlechat = 'googlechat_example' # str | (optional)
slack = 'slack_example' # str | (optional)
discord = 'discord_example' # str | (optional)
telegram = 'telegram_example' # str | (optional)
telegram_chat_id = 'telegram_chat_id_example' # str | (optional)
is_enabled = True # bool | (optional)
try:
# Create notification handler
api_response = api_instance.notification_handlers_post(name, type, email=email, webhook=webhook, squadcast=squadcast, googlechat=googlechat, slack=slack, discord=discord, telegram=telegram, telegram_chat_id=telegram_chat_id, is_enabled=is_enabled)
print("The response of NotificationHandlersApi->notification_handlers_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationHandlersApi->notification_handlers_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| type | str | ||
| str | [optional] | ||
| webhook | str | [optional] | |
| squadcast | str | [optional] | |
| googlechat | str | [optional] | |
| slack | str | [optional] | |
| discord | str | [optional] | |
| telegram | str | [optional] | |
| telegram_chat_id | str | [optional] | |
| is_enabled | bool | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Notification handler created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]