HP OneView REST API Reference

racks
racks.html[10/17/2013 10:35:42 AM]
(%25 is the encoded value for the wild character (%), and is
required to do partial matches.)
POST Adds a rack resource based upon the attributes specified. All attributes without default values
must be specified in the POST body. The response contains the rack resource as added to the
appliance with default and assigned properties expanded. The id and uri are assigned by the
management appliance and are used to uniquely identify this particular resource.
Parameter Attributes Description
Request
Header
Attributes Description
REST API Request Headers NOTE: The X-API-Version header is required for all APIs. For the
current release, this must be set to "X-API-Version:3"
Request
Body
Attributes Description
Rack Required The resource to add or update.
Response Description
Rack The resource as added to the appliance with default
and assigned properties.
Response Codes
REST API Response Codes
Examples
Add an empty rack with default values:
https://{appl}/rest/racks
Request body:
{
"name":"MyRack"
}
Add a rack with with custom size (depth 1500 mm, height 2500 mm, and
width 1200 mm), and a single mounted enclosure at slot 20.
https://{appl}/rest/racks
Request body:
{
"uuid":"4b4b87e2-eea8-4c90-8eca-b72eaaeecggf",
"name":"MyRack",
"depth":1500,
"height":2500,
"width":1200,
"rackMounts": [
{
"mountUri": "/rest/enclosures/USABDE00534F",
"topUSlot": 20,
"uHeight": 10
}
]
}