Cloud
Jira Service Management ops / Reference / REST API

Heartbeats

Postman Collection
OpenAPI

This resource represents the contract to create/update/delete/get of heartbeats in Jira Service Management.

GET

List heartbeatsExperimental

Lists the all heartbeats user can view. If a heartbeatName is passed, it filters out given heartbeat and only return given heartbeat.

read:ops-config:jira-service-management

Request

Path parameters

teamId

string

Required

Query parameters

name

string

offset

integer

size

integer

Responses

Returned if the request is successful

application/json

HeartbeatPaginatedResponse
GET/v1/teams/{teamId}/heartbeats
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/heartbeats' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 { "values": [ { "name": "Service Heartbeat", "description": "Heartbeat for checking service health", "interval": 5, "intervalUnit": "Days", "enabled": true, "status": "Responsive", "ownerTeamId": "4b26961a-a837-49d2-a1fe-0973013e3c3b", "alertMessage": "Service does not respond", "alertTags": [ "HighPriority", "Database" ], "alertPriority": "P2" } ], "links": { "next": "/v1/teams/77b933c9-92bb-46e7-a73c-764b8d7c3c25/heartbeats?offset=13&size=5" } }
POST

Create heartbeatExperimental

Create heartbeat request is used to define heartbeats in Jira Service Management. A heartbeat needs to be added, before sending heartbeat messages to JSM

read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Path parameters

teamId

string

Required

Request bodyapplication/json

name

string

Required
description

string

interval

integer

Required
enabled

boolean

intervalUnit

string

Required
alertMessage

string

alertTags

array<string>

alertPriority

string

Responses

Returned if the request is successful.

application/json

Heartbeat
POST/v1/teams/{teamId}/heartbeats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/heartbeats' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "DNS Server Checker", "description": "It checks whether server is online or not", "interval": 5, "enabled": true, "intervalUnit": "minutes", "alertMessage": "HeartbeatName is expired", "alertTags": [ "critical", "dns" ], "alertPriority": "P3" }'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "name": "Service Heartbeat", "description": "Heartbeat for checking service health", "interval": 5, "intervalUnit": "Days", "enabled": true, "status": "Responsive", "ownerTeamId": "4b26961a-a837-49d2-a1fe-0973013e3c3b", "alertMessage": "Service does not respond", "alertTags": [ "HighPriority", "Database" ], "alertPriority": "P2" }
DEL

Delete heartbeatExperimental

Deletes the heartbeat with given name in the request.

read:ops-config:jira-service-management
,
delete:ops-config:jira-service-management

Request

Path parameters

teamId

string

Required

Query parameters

name

string

Required

Responses

Returned if the request is successful.

DEL/v1/teams/{teamId}/heartbeats
1 2 3 curl --request DELETE \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/heartbeats?name={name}' \ --user 'email@example.com:<api_token>'
PATCH

Update heartbeatExperimental

Updates the heartbeat with the given name. Name of a heartbeat cannot be changed

read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Path parameters

teamId

string

Required

Query parameters

name

string

Required

Request bodyapplication/json

description

string

interval

integer

intervalUnit

string

enabled

boolean

alertMessage

string

alertTags

array<string>

alertPriority

string

Responses

Returned if the request is successful.

application/json

Heartbeat
PATCH/v1/teams/{teamId}/heartbeats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/heartbeats?name={name}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "description": "It checks whether server is online or not.", "interval": 5, "intervalUnit": "minutes", "enabled": true, "alertMessage": "HeartbeatName is expired", "alertTags": [ "critical", "dns" ], "alertPriority": "P1" }'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "name": "Service Heartbeat", "description": "Heartbeat for checking service health", "interval": 5, "intervalUnit": "Days", "enabled": true, "status": "Responsive", "ownerTeamId": "4b26961a-a837-49d2-a1fe-0973013e3c3b", "alertMessage": "Service does not respond", "alertTags": [ "HighPriority", "Database" ], "alertPriority": "P2" }
POST

Ping HeartbeatExperimental

Pings the heartbeat with given name. Heartbeat ping requests processed asynchronously, it does not check if the heartbeat exists or not before responding. Please note that receiving a PONG response does not necessarily mean that the heartbeat exists.

read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Path parameters

teamId

string

Required

Query parameters

name

string

Required

Responses

Returned if the request is successful.

application/json

SimpleSuccessResponse
POST/v1/teams/{teamId}/heartbeats/ping
1 2 3 4 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/heartbeats/ping?name={name}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
202Response
1 2 3 { "message": "PONG - Heartbeat received" }

Rate this page: