All URIs are relative to https://api.opsgenie.com
Method | HTTP request | Description |
---|---|---|
create_heartbeat | POST /v2/heartbeats | Create Heartbeat |
delete_heartbeat | DELETE /v2/heartbeats/{name} | Delete Heartbeat |
disable_heartbeat | POST /v2/heartbeats/{name}/disable | Disable Heartbeat |
enable_heartbeat | POST /v2/heartbeats/{name}/enable | Enable Heartbeat |
get_heartbeat | GET /v2/heartbeats/{name} | Get Heartbeat |
ping | GET /v2/heartbeats/{name}/ping | Ping Heartbeat |
update_heartbeat | PATCH /v2/heartbeats/{name} | Update Heartbeat (Partial) |
CreateHeartbeatResponse create_heartbeat(body)
Create Heartbeat
Create a new heartbeat
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
body = opsgenie_swagger.CreateHeartbeatPayload() # CreateHeartbeatPayload | Request payload of created heartbeat
try:
# Create Heartbeat
api_response = api_instance.create_heartbeat(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->create_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | CreateHeartbeatPayload | Request payload of created heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse delete_heartbeat(name)
Delete Heartbeat
Delete heartbeat with given name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
try:
# Delete Heartbeat
api_response = api_instance.delete_heartbeat(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->delete_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DisableHeartbeatResponse disable_heartbeat(name)
Disable Heartbeat
Disable heartbeat request with given name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
try:
# Disable Heartbeat
api_response = api_instance.disable_heartbeat(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->disable_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnableHeartbeatResponse enable_heartbeat(name)
Enable Heartbeat
Enable heartbeat request with given name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
try:
# Enable Heartbeat
api_response = api_instance.enable_heartbeat(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->enable_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetHeartbeatResponse get_heartbeat(name)
Get Heartbeat
Returns heartbeat with given name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
try:
# Get Heartbeat
api_response = api_instance.get_heartbeat(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->get_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse ping(name)
Ping Heartbeat
Ping Heartbeat for given heartbeat name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
try:
# Ping Heartbeat
api_response = api_instance.ping(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->ping: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateHeartbeatResponse update_heartbeat(name, body=body)
Update Heartbeat (Partial)
Update Heartbeatwith given name
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.HeartbeatApi(opsgenie_swagger.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
body = opsgenie_swagger.UpdateHeartbeatPayload() # UpdateHeartbeatPayload | Request payload of update heartbeat action (optional)
try:
# Update Heartbeat (Partial)
api_response = api_instance.update_heartbeat(name, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling HeartbeatApi->update_heartbeat: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of the heartbeat | |
body | UpdateHeartbeatPayload | Request payload of update heartbeat action | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]