HeadSpin Documentation
Documentation

Session Status Reliability API

Reliability

The reliability API can be used to inform HeadSpin about the status of sessions from a customer perspective. This API will generate reliability events that are used internally to monitor the HeadSpin platform for faults in the system.

Route Method
/v0/reliability/report-status POST

A json body should be included in the request with the following shape


{
 "session_id": <session id>,
 "status": <status>,
 "device_id": <device id>,
 "hostname": <hostname>,
 "message": "free form message",
}
  • <code class="dcode">session_id</code> should refer to a session
  • <code class="dcode">status</code> should be one of <code class="dcode">excluded</code>, <code class="dcode">failed</code>, <code class="dcode">passed</code>. A <code class="dcode">passed</code> status indicates a session that succeeded, <code class="dcode">failed</code> indicates a failure for any reason, and <code class="dcode">excluded</code> for a session that didn't pass but also shouldn't be considered a failure. excluded events are mainly useful for testing the reliability api without sending events that have a real impact.
  • <code class="dcode">device_id</code> the unique device id that identifies a device, such as <code class="dcode">abcd1234</code>
  • <code class="dcode">hostname</code> the full hostname the device is connected to, such as <code class="dcode">dev-us-pao-0-proxy-2.headspin.io</code>
  • <code class="dcode">message</code> a free form string that can provide any information deemed useful by either a customer or the HeadSpin engineering team. Optional and defaults to the empty string.

Example sending a failed session event


curl -X POST -H "Authorization: Bearer <your_api_token>" https://api-dev.headspin.io/v0/reliability/report-status -d '{"session_id": "50a4643d-b33b-435c-b3f0-59f953343418", "status": "failed", "device_id": "abcd1234", "hostname": "dev-us-pao-0-proxy-2.headspin.io", "message": "network requests failed during the session"}'