Status

Status information is larger information gathered by probes. Similar to statistics, but less frequent and larger in size.

Requesting status

Status is generally listed, found, or directly requested by id.

List Statuses

Call to /status/ to get a listing of status information

Request Object

+ URL
  /api/v2/status

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array of statuses.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    {
      "updatedAt": "2020-09-09T03:28:27.703Z",
      "createdAt": "2020-09-09T03:28:27.703Z",
      "hostid": "09e3b2bd",
      "name": "status_sensor",
      "state": "ok",
      "progress": null,
      "data": {
        "thermal_zone2": 29,
        "thermal_zone3": 32
      }
    },
    {
      "updatedAt": "2020-09-18T06:08:55.823Z",
      "createdAt": "2020-09-18T06:08:55.823Z",
      "hostid": "09e3b2bd",
      "name": "status_ha",
      "state": "warning",
      "progress": null,
      "data": {
        "error": "Command failed: pcs status xml\nError: running crm_mon, is pacemaker running?\n"
      }
    }
  ]

Get Statuses

Call to /status/$STATUS_NAME/get to get a listing of status information matching the name you have provided

Request Object

+ URL
  /api/v2/status/$STATUS_NAME/get

+ Method
  GET

+ Parameters
  status name (string, required, URL Params) - the name or partial name of the status.

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array of statuses with names like the one you provided

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    {
      "updatedAt": "2020-09-09T23:59:52.803Z",
      "createdAt": "2020-09-09T03:10:31.868Z",
      "hostid": "09e3b2bd",
      "name": "heartbeat",
      "state": null,
      "progress": null,
      "data": {
        "date": 1599695992799,
        "as_string": "04:59 PM PDT"
      }
    }
  ]

Find Statuses

Call to /status/find to get a listing of status information matching your query

Request Object

+ URL
  /api/v2/status/find

+ Method
  POST

+ Parameters
  name (string, required, BODY) - the name or partial name of the status.
  state (string, optional, BODY) - the state of the status info, mostly helpful for pool scans
  startMoment (date, optional, BODY) - when we should start listing status from, if sent. as ISO String
  endMoment (date, optional, BODY) - when we should stop listing status from, if sent, as ISO String

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "name": "heart"
  }

Response Object

Sending this should get you back a valid response, an array of statuses.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    {
      "updatedAt": "2020-09-09T23:59:52.803Z",
      "createdAt": "2020-09-09T03:10:31.868Z",
      "hostid": "09e3b2bd",
      "name": "heartbeat",
      "state": null,
      "progress": null,
      "data": {
        "date": 1599695992799,
        "as_string": "04:59 PM PDT"
      }
    }
  ]