All URIs are relative to https://api.opsgenie.com
Method | HTTP request | Description |
---|---|---|
change_notification_rule_order | POST /v2/users/{identifier}/notification-rules/{ruleId}/change-order | Change order of Notification Rule |
create_notification_rule | POST /v2/users/{identifier}/notification-rules | Create Notification Rule |
delete_notification_rule | DELETE /v2/users/{identifier}/notification-rules/{ruleId} | Delete Notification Rule |
disable_notification_rule | POST /v2/users/{identifier}/notification-rules/{ruleId}/disable | Disable Notification Rule |
enable_notification_rule | POST /v2/users/{identifier}/notification-rules/{ruleId}/enable | Enable Notification Rule |
get_notification_rule | GET /v2/users/{identifier}/notification-rules/{ruleId} | Get Notification Rule |
list_notification_rules | GET /v2/users/{identifier}/notification-rules | List Notification Rules |
update_notification_rule | PATCH /v2/users/{identifier}/notification-rules/{ruleId} | Update Notification Rule (Partial) |
SuccessResponse change_notification_rule_order(identifier, rule_id, body)
Change order of Notification Rule
Changes order of a notification rule with given notification rule id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
body = opsgenie_swagger.ChangeNotificationRuleOrderPayload() # ChangeNotificationRuleOrderPayload | Request payload of change order of notification rule
try:
# Change order of Notification Rule
api_response = api_instance.change_notification_rule_order(identifier, rule_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->change_notification_rule_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. | |
body | ChangeNotificationRuleOrderPayload | Request payload of change order of notification rule |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateNotificationRuleResponse create_notification_rule(identifier, body)
Create Notification Rule
Creates a new notification rule
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
body = opsgenie_swagger.CreateNotificationRulePayload() # CreateNotificationRulePayload | Request payload of create notification rule
try:
# Create Notification Rule
api_response = api_instance.create_notification_rule(identifier, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->create_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
body | CreateNotificationRulePayload | Request payload of create notification rule |
CreateNotificationRuleResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse delete_notification_rule(identifier, rule_id)
Delete Notification Rule
Deletes a notification rule with given notification rule id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
try:
# Delete Notification Rule
api_response = api_instance.delete_notification_rule(identifier, rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->delete_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse disable_notification_rule(identifier, rule_id)
Disable Notification Rule
Disables a notification rule with given notification rule id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
try:
# Disable Notification Rule
api_response = api_instance.disable_notification_rule(identifier, rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->disable_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse enable_notification_rule(identifier, rule_id)
Enable Notification Rule
Enables a notification rule with given notification rule id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
try:
# Enable Notification Rule
api_response = api_instance.enable_notification_rule(identifier, rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->enable_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetNotificationRuleResponse get_notification_rule(identifier, rule_id)
Get Notification Rule
Returns notification rule with given id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
try:
# Get Notification Rule
api_response = api_instance.get_notification_rule(identifier, rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->get_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListNotificationRulesResponse list_notification_rules(identifier)
List Notification Rules
Returns list of notification rules
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
try:
# List Notification Rules
api_response = api_instance.list_notification_rules(identifier)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->list_notification_rules: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateNotificationRuleResponse update_notification_rule(identifier, rule_id, body)
Update Notification Rule (Partial)
Updates the notification rule with given notification rule id
from __future__ import print_function
import time
import opsgenie_swagger
from opsgenie_swagger.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = opsgenie_swagger.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = opsgenie_swagger.NotificationRuleApi(opsgenie_swagger.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the user to be searched
rule_id = 'rule_id_example' # str | Id of the notification rule that step will belong to.
body = opsgenie_swagger.UpdateNotificationRulePayload() # UpdateNotificationRulePayload | Request payload of update notification rule
try:
# Update Notification Rule (Partial)
api_response = api_instance.update_notification_rule(identifier, rule_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationRuleApi->update_notification_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the user to be searched | |
rule_id | str | Id of the notification rule that step will belong to. | |
body | UpdateNotificationRulePayload | Request payload of update notification rule |
UpdateNotificationRuleResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]