HeadSpin Documentation
Documentation

PBox Enclosure API

Overview

This article specifically addresses API commands involving your PBox’s enclosure. Using the API commands here you can determine the enclosure’s temperature and set the host’s netboot status, which will assist you in maintaining the physical and logical health of the host systems in your PBox.

API Reference

Temperature data

Host/CMM netboot

Temperature data

Route Method
/temp GET

Example


curl --request GET http://pbox-enclosure-display-url:9000/temp

Response

A JSON object in the form of <code class="dcode">{"temp_addr_1": 25.4, "temp_addr_2": 26.4, ...}</code>. It is an object associating unique temperature sensor addresses with temperature values in Celcius.

An example:


{
    "288aa28b90048": 25.375,
    "378fa28c91147": 27.275
}

Host netboot

Set host netboot status

Route Method
/hostnetboot POST

Example


curl --header "Content-Type: application/json" --request POST --data '{"on":true, "index": -1}' http://pbox-enclosure-display-url:9000/hostnetboot

Request Body

A JSON object in the form of <code class="dcode">{'on': true, 'index': -1}</code>. The <code class="dcode">'on'</code> argument is a boolean which indicates if the indexed hosts should be turned on (<code class="dcode">true</code>) or off (<code class="dcode">false</code>). The 'index' argument is an int type which indicates which hosts are affected. A value of -1, e.g. <code class="dcode">'index': -1</code> targets all hosts. A positive value between 0 and 2, e.g. <code class="dcode">'index': 0</code>, targets a specific host.

An example:


{
    "on": true,
    "index": -1
}