Skip to content

Latest commit

 

History

History
438 lines (307 loc) · 12.4 KB

HeartbeatApi.md

File metadata and controls

438 lines (307 loc) · 12.4 KB

opsgenie_sdk.HeartbeatApi

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
list_heart_beats GET /v2/heartbeats List Heartbeats
ping GET /v2/heartbeats/{name}/ping Ping Heartbeat
update_heartbeat PATCH /v2/heartbeats/{name} Update Heartbeat (Partial)

create_heartbeat

CreateHeartbeatResponse create_heartbeat(create_heartbeat_payload)

Create Heartbeat

Create a new heartbeat

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.ApiClient(configuration))
create_heartbeat_payload = opsgenie_sdk.CreateHeartbeatPayload() # CreateHeartbeatPayload | Request payload of created heartbeat

try:
    # Create Heartbeat
    api_response = api_instance.create_heartbeat(create_heartbeat_payload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HeartbeatApi->create_heartbeat: %s\n" % e)

Parameters

Name Type Description Notes
create_heartbeat_payload CreateHeartbeatPayload Request payload of created heartbeat

Return type

CreateHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_heartbeat

SuccessResponse delete_heartbeat(name)

Delete Heartbeat

Delete heartbeat with given name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.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)

Parameters

Name Type Description Notes
name str Name of the heartbeat

Return type

SuccessResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

disable_heartbeat

DisableHeartbeatResponse disable_heartbeat(name)

Disable Heartbeat

Disable heartbeat request with given name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.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)

Parameters

Name Type Description Notes
name str Name of the heartbeat

Return type

DisableHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

enable_heartbeat

EnableHeartbeatResponse enable_heartbeat(name)

Enable Heartbeat

Enable heartbeat request with given name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.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)

Parameters

Name Type Description Notes
name str Name of the heartbeat

Return type

EnableHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_heartbeat

GetHeartbeatResponse get_heartbeat(name)

Get Heartbeat

Returns heartbeat with given name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.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)

Parameters

Name Type Description Notes
name str Name of the heartbeat

Return type

GetHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_heart_beats

ListHeartbeatResponse list_heart_beats()

List Heartbeats

Returns list of Heartbeats

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.ApiClient(configuration))

try:
    # List Heartbeats
    api_response = api_instance.list_heart_beats()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HeartbeatApi->list_heart_beats: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ping

SuccessResponse ping(name)

Ping Heartbeat

Ping Heartbeat for given heartbeat name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.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)

Parameters

Name Type Description Notes
name str Name of the heartbeat

Return type

SuccessResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_heartbeat

UpdateHeartbeatResponse update_heartbeat(name, update_heartbeat_payload=update_heartbeat_payload)

Update Heartbeat (Partial)

Update Heartbeatwith given name

Example

  • Api Key Authentication (GenieKey):
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint
configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.HeartbeatApi(opsgenie_sdk.ApiClient(configuration))
name = 'name_example' # str | Name of the heartbeat
update_heartbeat_payload = opsgenie_sdk.UpdateHeartbeatPayload() # UpdateHeartbeatPayload | Request payload of update heartbeat action (optional)

try:
    # Update Heartbeat (Partial)
    api_response = api_instance.update_heartbeat(name, update_heartbeat_payload=update_heartbeat_payload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HeartbeatApi->update_heartbeat: %s\n" % e)

Parameters

Name Type Description Notes
name str Name of the heartbeat
update_heartbeat_payload UpdateHeartbeatPayload Request payload of update heartbeat action [optional]

Return type

UpdateHeartbeatResponse

Authorization

GenieKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]