HP OneView REST API Reference

datacenters
datacenters.html[10/17/2013 10:35:40 AM]
Gets all data centers with a uuid that ends with 82fac9caf4f2:
https://{appl}/rest/datacenters?filter="uuid matches
'%2582fac9caf4f2'"
(%25 is the encoded value for the wild character (%), and is
required to do partial matches.)
POST Adds a data center resource based upon the attributes specified. All attributes without default
values must be specified in the POST body. The response contains the data center 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
Datacenter Required The resource to add or update.
Response Description
Datacenter The resource as added to the appliance with
default and assigned properties.
Response Codes
REST API Response Codes
Examples
Add a data center with default values:
https://{appl}/rest/datacenters
Request body:
{"name":"MyDatacenter", "width":5000, "depth":5000}
Add data center with specified properties (no racks):
https://{appl}/rest/datacenters
Request body:
{
"name":"MyDatacenter",
"coolingCapacity":5,
"costPerKilowattHour":0.10,
"currency":"USD",
"deratingType":"NaJp",
"deratingPercentage":20.0,
"defaultPowerLineVoltage":220,
"coolingMultiplier":1.5,
"width":4000,
"depth":5000,
"contents":[]
}