Hardware Inventory API
The Hardware Inventory API manages the ENTITY-MIB hardware inventory tree associated with a node.
This is a sub-resource of the Nodes API. All resources are reached under the parent path /rest/nodes/{nodeCriteria}, where {nodeCriteria} is either a node database ID or a foreignSource:foreignId tuple.
|
GETs (reading data)
| Resource | Description |
|---|---|
|
Fetches the root hardware entity (the full inventory tree) for the node. Produces |
|
Fetches a single hardware entity by its |
POSTs (Creating Data)
POST consumes application/xml or application/json.
| Resource | Description |
|---|---|
|
Sets (or overrides) the root hardware entity for the node. |
|
Adds or replaces a child entity beneath the entity identified by |
PUT (modifying data)
PUT consumes application/x-www-form-urlencoded.
| Resource | Description |
|---|---|
|
Updates properties of the entity identified by |
DELETEs (Removing Data)
| Resource | Description |
|---|---|
|
Deletes the entity identified by |
Examples using cURL
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/nodes/1/hardwareInventory"
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/nodes/1/hardwareInventory/1"
curl -u admin:admin -X PUT \
-d "entPhysicalName=Slot 1" \
"http://127.0.0.1:8980/opennms/rest/nodes/1/hardwareInventory/1"
curl -u admin:admin -X DELETE "http://127.0.0.1:8980/opennms/rest/nodes/1/hardwareInventory/5"