Public API

XorMon NG provides a standard REST API for integration with other tools.

Features
  • export performance data stored in XorMon NG database
  • add/remove/list devices
  • show health status
REST API documentation is available in the Web UI, navigate to Settings (cogwheel) ➡ Public API The feature is only available to customers with support subscription.

Examples

Authentication
curl -ks -X POST https://<IP>/api/public/v1/auth -H 'Content-Type: application/json' -d '{"username": "xormon",    "password": "xormon"}'

{
  "statusCode":200,
  "data":{
    "apiKey":"0ac125069c6da17f7801c7ac70784efe",
    "expiration":"2024-05-11T08:40:15.628Z"
  }
}

List devices
curl -ks -X GET https://<IP>/api/public/v1/hostcfg -H 'apiKey: e648c336b6c0558279c75025f1b6f7be'

{
  "statusCode": 200,
  "data": [
    {
      "hostcfg_id": "c2f41bfd-dba4-4d27-97d8-a36f8eb9ec8d",
      "label": "Lenovo DE2000",
      "hw_type": "eseries",
      "disabled": false,
      "target": false,
      "ignore_health_status": false,
      "ignore_health_status_reason": null,
      "data": {
        "device": "LENOVO__TS_DE_SERIES",
        "apiHost": "192.169.0.12",
        "apiPort": 8443,
        "apiPassword": null,
        "apiUsername": "monitor"
      },
      "createdAt": "2024-04-10T17:43:49.975Z",
      "updatedAt": "2024-04-10T17:43:49.975Z",
      "hw_type_label": "E-series",
      "limited": false
    }
  ]
}

Health Status
curl -ks -X GET https://<IP>/api/public/v1/health_status -H 'apiKey: e648c336b6c0558279c75025f1b6f7be'

{
  "statusCode": 200,
  "data": [
    {
      "status": "OK",
      "count": 1,
      "devices": [
        {
          "class": "storage",
          "hw_type": "eseries",
          "hw_type_label": "E-series",
          "label": "Lenovo DE2000",
          "item_id": "c2f41bfd-dba4-4d27-97d8-a36f8eb9ec8d",
          "updatedAt": 1712825103056,
          "note": "Storage array status is optimal.",
          "status": "ok",
          "data": 0,
          "connection": 0,
          "ignored": false,
          "ignore_reason": null,
          "url": "/api/menu/v1/page/eseries/health-status?item_id=c2f41bfd-dba4-4d27-97d8-a36f8eb9ec8d"
        }
      ]
    },
    {
      "status": "WARNING",
      "count": 0,
      "devices": []
    },
    {
      "status": "ERROR",
      "count": 0,
      "devices": []
    },
    {
      "status": "UNKNOWN",
      "count": 0,
      "devices": []
    },
    {
      "status": "IGNORED",
      "count": 0,
      "devices": []
    }
  ]
}