Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Heartbeat API

Create an API Integration and obtain your apiKey to make requests listed above. Please make sure that the integration is not restricted to access configurations. Otherwise, the integration will only be authorized to send Ping Heartbeat Request

Ping Heartbeat Request

HTTP Method
URL

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

Sample Requests

curl -X GET 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/ping'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889' 
curl -X POST 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/ping'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889' 
curl -X PUT 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/ping'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889' 
curl -X PATCH 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/ping'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889' 

Response

{
    "result": "PONG - Heartbeat received",
    "took": 0,
    "requestId": "111be080-6632-4897-a6e9-b8dc72f943c7"
}

Add Heartbeat Request

Add Heartbeat request is used to define heartbeats in OpsGenie. A heartbeat needs to be added, before sending heartbeat messages to OpsGenie. If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

Field
Mandatory
Description
Limit

name

true

Name of the heartbeat

200 chars

description

false

An optional description of the heartbeat

10000 chars

interval

true

Specifies how often a heartbeat message should be expected.

Min 1

intervalUnit

true

Interval specified as minutes, hours or days

enabled

true

Enable/disable heartbeat monitoring

Sample Request

curl -X POST 'https://api.opsgenie.com/v2/heartbeats'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'
    --header 'Content-Type: application/json'
    --data
'{
    "name" : "HeartbeatName",
    "description": "Sample heartbeat description"
    "intervalUnit" : "minutes",
    "interval" : 10,
    "enabled" : true,
}'

Response

{
    "data": {
        "name": "HeartbeatName",
        "description": "Sample heartbeat description"
        "interval": 10,
        "enabled": true,
        "intervalUnit": "minutes",
        "expired": true
    },
    "took": 0,
    "requestId": "a19344d1-6ece-4c1c-9c02-cb062e1d21f9"
}

Get Heartbeat Request

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

Sample Request

curl -X GET 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'

Response

{
    "data": {
        "name": "HeartbeatName",
        "description": "Sample heartbeat description"
        "interval": 10,
        "enabled": true,
        "intervalUnit": "minutes",
        "expired": true
    },
    "took": 0,
    "requestId": "9bc9e05b-2f07-44b3-9be0-cb0ec0c45533"
}

Update Heartbeat Request (Partial)

Update Heartbeat request is used to change configuration of existing heartbeats. If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

JSON Body Fields

Field
Mandatory
Description
Limit

description

false

An optional description of the heartbeat

10000 chars

interval

false

Specifies how often a heartbeat message should be expected.

Min 1

intervalUnit

false

Interval specified as minutes, hours or days

enabled

false

Enable/disable heartbeat monitoring

Sample Request

curl -X PATCH 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'
    --header 'Content-Type: application/json'
    --data
'{
    "interval": "5",
    "intervalUnit": "hours",
    "description": "updated heartbeat",
    "enabled": true
}'

Response

{
    "data": {
        "name": "HeartbeatName",
        "enabled": true,
        "expired": false
    },
    "took": 0,
    "requestId": "75a91218-0d78-4a17-a983-c290fe15906f"
}

Delete Heartbeat Request

Delete heartbeat request is used to delete monitored heartbeat in OpsGenie. If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

Sample Request

curl -X DELETE 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'

Response

{
    "result": "Deleted",
    "took": 0,
    "requestId": "70b60422-02fa-4568-8f46-a9c0e5409083"
}

Enable Heartbeat Request

Enable heartbeat request is used to enable monitored heartbeat in OpsGenie. If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

Sample Requests

curl -X POST 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/enable'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'

Response

{
    "data": {
        "name": "HeartbeatName",
        "enabled": true,
        "expired": false
    },
    "took": 0,
    "requestId": "ee0ec5ae-0afc-49ab-862f-3c62612612f0"
}

Disable Heartbeat Request

Disable heartbeat request is used to disable monitored heartbeat in OpsGenie. If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

In-Line Parameters

Referred Name
Description

heartbeatName

Name of the heartbeat

Sample Requests

curl -X POST 'https://api.opsgenie.com/v2/heartbeats/HeartbeatName/disable'
    --header 'Authorization: GenieKey eb243592-faa2-4ba2-a551q-1afdf565c889'

Response:

{
    "data": {
        "name": "HeartbeatName",
        "enabled": false,
        "expired": true
    },
    "took": 0,
    "requestId": "1f77b0ea-dd20-40de-94ec-e875a09e8cc9"
}

Heartbeat API