Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (64 sloc) 2.43 KB

API Reference

The examples below assume OpenDCRE is running on a given <ipaddress> and <port>. The default port for OpenDCRE is TCP port 5000. Currently, all commands are GET requests; a future version will expose these commands via POST as well.

Note

In the API reference information below, there are many references to board_id and device_id parameters. For IPMI Devices, the values in a board's hostnames and ip_addresses fields (e.g. from a :ref:`opendcre-scan-command`) can be used in place of the board_id. Additionally, the device_info field for a given device, where specified, can be used in place of its device_id.

As an example, a device :ref:`opendcre-read-command` for a system temperature device on a board whose (abridged) scan information provides us with:

{
  "board_id": "40000039",
  "devices": [
    {
      "device_id": "0011",
      "device_info": "System Temp",
      "device_type": "temperature"
    }
  ],
  "hostnames": [
    "kafka001.vapor.io"
  ],
  "ip_addresses": [
    "192.168.1.10"
  ]
}

We could formulate a temperature read call in a variety of ways:

GET /opendcre/1.3/read/temperature/rack_9/40000039/0011
GET /opendcre/1.3/read/temperature/rack_9/40000039/System%20Temp
GET /opendcre/1.3/read/temperature/rack_9/kafka001.vapor.io/0011
GET /opendcre/1.3/read/temperature/rack_9/kafka001.vapor.io/System%20Temp
GET /opendcre/1.3/read/temperature/rack_9/192.168.1.10/0011
GET /opendcre/1.3/read/temperature/rack_9/192.168.1.10/System%20Temp

As of version 1.3.0, this only works for IPMI Devices, but this functionality will come later for all other devices.