Generate Heartbeats

This documentation will describe the Generate Heartbeats (XMHRTBT) endpoint. This endpoint is used by the application to periodically notify DICE the application is healthy.

Use cases

  • Assign proactive alerts to your application.
  • Application developers requiring a notification for when their app is up or down.

Supported attributes

AttributeTypeRequiredDescription
*setMethodstringYesDetermines the endpoint you are calling. Must be XMHRTBT to create heartbeats.
HB_KEYstringYesIdentifier provided by central station for your application (3 character max).
SECONDS_TIL_BANNERstringYesThe number of seconds until you must call this again to indicate your service is healthy. Default is 60.

Example request

curl --location "https://example.securemcloud.com/rest/rest.php?dataSource=methods&*view=xmsubmit" \
--header 'X-DICE-APPKEY: {{X-DICE-APPKEY}}' \
--header 'X-DICE-USERNAME: {{X-DICE-USERNAME}}' \
--header 'X-DICE-DATE: {{X-DICE-DATE}}' \
--header 'X-DICE-NONCE: {{X-DICE-NONCE}}' \
--header 'X-DICE-DIGEST: {{X-DICE-DIGEST}}' \
--header 'Accept: application/json' \
--form '*setMethod="XMHRTBT"' \
--form 'HB_KEY="Ab1"' \
--form 'SECONDS_TIL_BANNER="120"'

Example response

If the authentication and required attributes are valid, a success code will be returned.

{
    "STATUS": "SUCCESS"
}

Possible error messages

Fail

If the FAIL status displays, your username does not have the proper permissions to heartbeat the defined application/identifier. Contact your central station if you believe this is incorrect.

{
    "STATUS": "FAIL"
}