Dell PowerEdge Redfish API Overview
Dell PowerEdge Redfish API Overview
Version 1.0
March 2016
THIS WHITE PAPER IS FOR INFORMATIONAL PURPOSES ONLY, AND MAY CONTAIN TYPOGRAPHICAL ERRORS AND TECHNICAL INACCURACIES. THE CONTENT IS
PROVIDED AS IS, WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND.
Copyright 2016 Dell Inc. All rights reserved. Dell and the Dell logo are trademarks of Dell Inc. in the United States and/or other jurisdictions. All other marks and names
mentioned herein may be trademarks of their respective companies .
The Distributed Management Task Force (DMTF) Scalable Platforms Management Forum (SPMF) has published Redfish,
an open industry-standard specification and schema designed to meet the needs of IT administrators for simple,
modern, and secure management of scalable platform hardware. Dell is a key contributor to the Redfish standard,
acting as co-chair of the SPMF, promoting the benefits of Redfish, and working to deliver those benefits within Dell
industry-leading systems management solutions.
This document provides an overview of the Redfish Scalable Platforms Management API standard and describes the
Dell implementation of Redfish for Dells 12th and 13th generation of PowerEdge servers, delivered by the integrated
Dell Remote Access Controller (iDRAC) with Lifecycle Controller.
While management interfaces such as SNMP and IPMI have been present in data centers for the past decade, they
have not been able to meet the changing requirements due to security and technical limitations.
Further, the scale of deployment has grown significantly as IT models have evolved. Today, organizations often rely on
a large number of lower-cost servers with redundancy provided in the software layer, making scalable management
interfaces more critical.
To meet such market requirements, a new, unifying management standard was needed.
This document describes Redfisha next generation management standard using a data model representation inside
a hypermedia RESTful interface. The data model is defined in terms of a standard, machine-readable schema, with the
payload of the messages expressed in JSON and the protocol using OData v4. Because it is a hypermedia API, Redfish
is capable of representing a variety of implementations by using a consistent interface. It has mechanisms for
discovering and managing data center resources, handling events, and managing long-lived tasks.
Dell is enhancing its leading systems management capabilities with the introduction of Redfish support on the
integrated Dell Remote Access Controller (iDRAC) with Lifecycle Controller. This white paper provides the required
information to create Redfish clients or use existing REST clients to deliver the benefits of the Redfish API on
PowerEdge servers. This document can also be used to help legacy management consoles support or enable the
Redfish standard.
New IT solutions models have placed new demands on systems management solutions to support expanded scale,
higher security and multi-vendor openness while also aligning with modern DevOps tools and processes.
Recognizing these needs, Dell and other IT solutions leaders within the DMTF undertook the creation of a new
management interface standard. After a multi-year effort, the new standard, Redfish v1.0, was announced in July,
2015.
Redfish has been designed to support the full range of server architectures from monolithic servers to converged
infrastructure and hyper-scale architecture. The Redfish data model, which defines the structure and format of data
representing server status, inventory and available operational functions, is vendor-neutral. Administrators can then
create management automation scripts that can manage any Redfish compliant server. This is crucial for the efficient
operation of a heterogonous server fleet.
Using Redfish also has significant security benefitsunlike legacy management protocols, Redfish utilizes HTTPS
encryption for secure and reliable communication. All Redfish network traffic, including event notifications, can be
sent encrypted across the network.
Redfish provides a highly organized and easily accessible method to interact with a server using scripting tools. The
web interface employed by Redfish is supported by many programming languages, and its tree-like structure makes
information easier to locate. Data returned from a Redfish query can be turned into a searchable dictionary consisting
of key-value-pairs. By looking at the values in the dictionary, it is easy to locate settings and current status of a Redfish
managed system. These settings can then be updated and actions issued to one or multiple systems.
Organizations are now looking for open management solutions that can be controlled in the same way they control
other resources, irrespective of whether the resources are located in a cloud or in a data center. By adopting data
structures and access methods as used for cloud- and web-based infrastructure, Redfish will enable management
methods aligned with modern IT infrastructure. Utilizing a modern data model and RESTful API, Redfish can be readily
integrated with the IT automation tools and processes employed by DevOps practices, a key requirement in many IT
organizations.
System administrators can use Redfish to manage heterogeneous server fleets more efficiently throughout the server
lifecycle from bare metal deployments to maintenance and repurposing. Using a simple and powerful interface that
supports modern automation technologies, Redfish can speed time-to-solution for IT developers.
HTTPS communications
The Hypertext Transfer Protocol or HTTP is an application protocol for distributed, collaborative, hypermedia
information systems and forms the foundation of data communication for the World Wide Web. Secure HTTP or
HTTPS is a secure version of HTTP that enables secure communications by operating HTTP within a network
connection encrypted by TLS or SSL. By utilizing HTTPS, Redfish significantly enhances the security of server
management especially in comparison to legacy server management protocols.
JSON data
Redfish represents data using JSON. JSON is a lightweight data-interchange format that is easy for people to read and
write and also for machines to parse. JSON is based on a subset of the JavaScript Programming Language, using a text
format that is completely language independent but uses conventions familiar to programmers of the C-family of
languages such as C, C++, C#, Java, JavaScript, Perl, and Python. These properties make JSON an ideal data-
interchange language.
OData
OData is an open protocol standard for the definition and exchange of information using RESTful APIs. OData was
originally created in 2007 by Microsoft and subsequently standardized by the OASIS standards body. When
implementing a common interface across multiple vendors, it becomes important to standardize the data formats.
OData provides Redfish the required framework to ensure that the data structures remain interchangeable between
server vendors.
Eventing
The Redfish v1.0 specification includes support for eventing that enables the notification to a management client of
significant events occurring in a server. Redfish provides push style event notifications to an event listener, defined as a
Redfish compliant HTTPS server. The listener subscribes to the events of interest based on the event types defined in
the Redfish specification. Event subscriptions remain in place until specifically deleted or until the Redfish manager
such as iDRAC is reset to its default configuration.
Upon receiving an event subscription request, iDRAC will add the hostname of the requestor to the list of targets to be
notified when the event occurs. In the initial iDRAC Redfish implementation, all events are categorized under the Alert
Event Type with a maximum of 20 event subscriptions per event listener. If delivery of an event notification fails, the
event service will retry delivery. The parameters for re-delivery are configurable.
Redfish events are delivered only over HTTPS transport. In the initial iDRAC Redfish implementation, HTTPS certificates
are disabled; this requires the event listener to support receiving event notifications without certificate validation.
Eventing with certificate support is planned for a future release.
Management
iDRAC
Network
Redfish Client
The REST principle of "Everything is a Resource" means that every Uniform Resource Identifier or URI represents a
resource of a specific type. This can be a service, a collection, an entity or some other construct. In the Redfish
context, a resource can be thought of as the content of the HTTP message returned when accessing a URI. A variety
of REST Clients can be used for gaining access to Redfish resources such as:
Apps like Advanced REST Client and Postman from the Google Chrome web store
REST Easy and RESTClient plug-ins for the Firefox browser
cURL, Python, and other scripting/programming languages that provide support for dealing with URIs and for
parsing JSON payloads.
The URI is the primary unique identifier of resources. Redfish URIs consist of three parts as described in RFC3986: Part
one defines the scheme and authority of the URI, part two specifies the root service and version and part three defines
a unique resource identifier.
https://<iDRAC IP>/redfish/v1/Systems/System.Embedded.1/Storage/Controllers/RAID.Integrated.1-1
Note that the API is best navigated starting from the root as some portions of an API path can vary depending upon
the server hardware configuration. For example, the RAID.Integrated.1-1 Sub-item in the preceding example may be
different when another type of RAID controller is installed in the managed server.
Redfish Operations
In Redfish, HTTP methods implement the operations of a RESTful API. This allows the user to specify the type of
request being made. It adheres to a standard CRUD (Create, Retrieve, Update, and Delete) format. Depending on the
desired result, a user can issue the following types of commands:
Note: In the current implementation, HEAD and PUT operations are not supported for Redfish URIs.
Creation and removal of data are limited depending on the management characteristics of the resource being
targeted. Generally, viewing and changing settings will be more common.
Authentication
Depending upon the sensitivity of a given resource, Redfish clients will be required to authenticate their access. The
required credentials and supported forms of authentication are determined by the platform being managed. In the
case of iDRAC, authentication is supported using local iDRAC credentials or any of the other supported authentication
methods, such as LDAP and Active Directory.
Access to iDRAC data is allowed by authenticated and authorized users only, except as noted below. Authentication is
achieved using a subset of the common HTTP headers supported by a Redfish service in particular, the X-Auth-
Token header. More details on authentication are provided in the Session Management section of the Redfish
specification.
Authorization covers both user privilege and license authorization. Note that iDRAC Redfish support does not require
any special or separate licensing. The following table details the authentication and authorization required for each
iDRAC Redfish action:
Basic authentication: In this method, user name and password are provided for each Redfish API request.
Session Based Authentication: This method is used when issuing multiple Redfish operation requests.
o Session login is initiated by accessing the Create session URI. The response for this request includes an X-
Auth-Token header with a session token. Authentication for subsequent requests is made using this X-
Auth-Token header.
o Session logout is performed by issuing a DELETE of the Session resource provided by the Login operation
including the X-Auth-Token header.
o Using this approach, Redfish supports multiple transactions within a session with the help of X-Auth-
token, session token and Location headers.
Privileges
Privilege model requirements are aligned to the Redfish specification and schema. The following table shows the
relationship between Redfish Privileges and native iDRAC Privileges:
Figure 3 illustrates the JSON response to a GET query. In order to improve readability, it is also possible to install a
JSON parser. The examples in this white paper use JSONView, (link accessible using Google Chrome) available from
the Chrome Web Store. Other JSON parsers are available for specific browsers and needs.
Each of the @odata.id tags can be explored individually to allow a user to drill down deeper into the Redfish tree, but
further access will prompt for authentication.
For example, Figure 5 shows how to access the Chassis collection. When the /redfish/v1/Chassis/System.Embedded.1
URI is accessed, a pop-up box appears prompting for the entry of an iDRAC user name and password. After these
credentials are validated, more system details and additional @odata.id tags are presented:
cURL is a powerful open source command line tool for interacting with various web-based services. It supports both
HTTP and HTTPS in addition to other protocols. In the case of Redfish, cURL can be used to test the availability and
function of the REST interface.
Supplying cURL with the iDRAC IP address and the Redfish root will access the service root. If the server has a self-
signed certificate, as in this case, the certificate check can be skipped using the cURL option -k.
Command:
Response:
{"@odata.context":"/redfish/v1/$metadata#ServiceRoot","@odata.id":"/redfish/v1","@odata.type":"#ServiceRoot.1.0.0.Se
rviceRoot","AccountService":{"@odata.id":"/redfish/v1/Managers/iDRAC.Embedded.1/AccountService"},"Chassis":{"@od
ata.id":"/redfish/v1/Chassis"},"Description":"Root
Service","EventService":{"@odata.id":"/redfish/v1/EventService"},"Id":"RootService","JsonSchemas":{"@odata.id":"/redfish
/v1/JSONSchemas"},"Links":{"Sessions":{"@odata.id":"/redfish/v1/Sessions"}},"Managers":{"@odata.id":"/redfish/v1/Manag
ers"},"Name":"Root
Service","RedfishVersion":"1.0.0","Registries":{"@odata.id":"/redfish/v1/Registries/Messages/En"},"SessionService":{"@oda
ta.id":"/redfish/v1/SessionService"},"Systems":{"@odata.id":"/redfish/v1/Systems"},"Tasks":{"@odata.id":"/redfish/v1/TaskS
ervice"}}
For cleaner output formatting, the JSON output can be passed to Python and the module json.tool (output limited for
brevity):
Command:
Response:
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot",
"@odata.id": "/redfish/v1",
"@odata.type": "#ServiceRoot.1.0.0.ServiceRoot",
"AccountService": {
"@odata.id": "/redfish/v1/Managers/iDRAC.Embedded.1/AccountService"
},
"Chassis": {
"@odata.id": "/redfish/v1/Chassis"
Basic Authentication: Drilling down further into the Redfish API will require authentication. This can be done using
-u username:password on the cURL command line:
Session Based Authentication: This requires a two stage process, creating a session called Login and deleting session
called Logout. For login, run the following command in verbose mode by appending option v; this will output the X-
Auth-Token value for use in the subsequent commands:
Once logged in, subsequent commands can be sent using X-Auth-Token as shown below:
After executing the desired commands, the session can be terminated using Logout:
import requests
import json
system = requests.get('https://<iDRAC
IP>/redfish/v1/Systems/System.Embedded.1',verify=False,auth=('root','calvin'))
systemData = system.json()
storageData = storage.json()
Output:
Model: PowerEdge R730
Manufacturer: Dell Inc.
Service tag BN7----
Serial number: CN7-----------
Hostname: XenServer
Power state: On
Asset tag:
Memory size: 64.0
CPU type: Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz
Number of CPUs: 2
System status: OK
RAID health: OK
import requests
import json
system = requests.get('https://<iDRAC
IP>/redfish/v1/Managers/iDRAC.Embedded.1/Logs/Sel',verify=False,auth=('root','calvin'))
systemData = system.json()
import requests
import json
response = requests.get('https://<iDRAC
IP>/redfish/v1/Systems/System.Embedded.1',verify=False,auth=('root','calvin'))
data = response.json()
print data[u'PowerState']
Power on a system
Server power is controlled by using a POST operation to the ComputerSystem.Reset URI to request the desired action.
import requests
import json
url = 'https://<iDRAC
IP>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset'
payload = {'ResetType': 'On'}
headers = {'content-type': 'application/json'}
url = 'https://<iDRAC
IP>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset'
payload = {'ResetType': 'ForceOff'}
headers = {'content-type': 'application/json'}
import requests
import json
system = requests.get('https://<iDRAC
IP>/redfish/v1/Chassis/System.Embedded.1/Power/PowerControl',verify=False,auth=('root','c
alvin'))
systemData = system.json()
Output:
Consumed power: 149
Average reading: 155
Max reading: 169
Min reading: 144
import requests
import json
Using the above script, if the user provides an incorrect type for the input data as shown below, they will receive
extended information specifying the error. For example, if the payload was improperly input as:
payload = {' Hostname ': 1234 } this would result in the following output:
Output:
Status Code: 400
Extended Info Message: {u'error': {u'code': u'Base.1.0.GeneralError', u'message':
u'A general error has occurred. See ExtendedInfo for more information',
u'@Message.ExtendedInfo': [{u'Severity': u'Warning', u'MessageId':
u'Base.1.0.PropertyValueTypeError', u'RelatedProperties': [u'HostName'], u'Message':
u'The value integer or boolean for the property HostName is of a different type than the
property can accept.', u'Resolution': u'Correct the value for the property in the request
body and resubmit the request if the operation failed.', u'MessageArgs': [u'integer or
boolean', u'HostName']}]}}
If there are internal processing errors for a request, a 500 status code will be returned with an internal error message:
Output:
Status Code: 500
Extended Info Message: {u'error': {u'code': u'Base.1.0.GeneralError', u'message':
u'A general error has occurred. See ExtendedInfo for more information',
u'@Message.ExtendedInfo': [{u'Severity': u'Critical', u'MessageId':
u'Base.1.0.InternalError', u'RelatedProperties': [u'HostName'], u'Message': u'The request
failed due to an internal service error. The service is still operational.',
u'Resolution': u'Resubmit the request. If the problem persists, consider resetting the
service.'}]}}
import requests
import json
import requests
import json
Extended Information
When errors occur during operations, Redfish provides Extended Information detailing the error. iDRAC includes a
Dell-provided Message Registry, accessible by the MessageId returned as part of the Extended Information, that gives
direction for resolution of the error.
import requests
import json
url = 'https://<iDRAC
IP>/redfish/v1/Managers/iDRAC.Embedded.1/SerialInterfaces/iDRAC.Embedded.1%23Serial.1'
payload = {'BitRate':19200}
headers = {'content-type':'application/json'}
response =
requests.patch(url,data=json.dumps(payload),headers=headers,verify=False,auth=('root','ca
lvin'))
The above script updates the property 'BitRate' to the value 19200, a valid setting.
Output:
Status Code: 200
Extended Error Message:{u'Success': {u'Message': u'Successfully Completed Request',
u'Resolution': u'None', u'Severity': u'Ok', u'MessageId': u'Base.1.0.Success'}}
If the script is modified to attempt an update with an unsupported value, an error will occur and Extended Information
will be returned:
payload = {'BitRate':1900}
Output:
Status Code: 400
Extended Error Message: {u'error': {u'code': u'Base.1.0.GeneralError', u'message':
u'A general error has occurred. See ExtendedInfo for more information',
u'@Message.ExtendedInfo': [{u'Severity': u'Warning', u'MessageId':
u'Base.1.0.PropertyValueNotInList', u'RelatedProperties': [u'BitRate'], u'Message': u'The
value 1900 for the property BitRate is not in the list of acceptable values.',
u'Resolution': u'Choose a value from the enumeration list that the implementation can
support and resubmit the request if the operation failed.', u'MessageArgs': [u'1900',
u'BitRate']}]}}
The following example uses an incorrect data type a text string rather than a numeric value. This illustrates the
distinctive error information and resolutions provided by Extended Information and the Dell Message Registry.
payload = {'BitRate':'19200'}
Output:
Status Code:400
Extended Error Message: {u'error': {u'code': u'Base.1.0.GeneralError', u'message':
u'A general error has occurred. See ExtendedInfo for more information',
u'@Message.ExtendedInfo': [{u'Severity': u'Warning', u'MessageId':
u'Base.1.0.PropertyValueTypeError', u'RelatedProperties': [u'BitRate'], u'Message': u'The
value string or boolean for the property BitRate is of a different type than the property
can accept.', u'Resolution': u'Correct the value for the property in the request body and
resubmit the request if the operation failed.', u'MessageArgs': [u'string or boolean',
u'BitRate']}]}}
Dell is a committed leader in the development and implementation of open, industry standards. Supporting Redfish
within the iDRAC with Lifecycle Controller further enhances the manageability of PowerEdge servers, providing
another powerful tool to help IT administrators reduce complexity and help save time and money.
Bangalore
https://www.dmtf.org/standards/redfish
http://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.0.1.pdf
The iDRAC with Lifecycle Controller home page on Dell TechCenter provides access to product documents, technical
white papers, how-to videos and more
http://en.community.dell.com/techcenter/systems-management/w/wiki/3204
http://www.json.org/
OData4 open protocol standard for the definition and exchange of information using RESTful APIs
http://www.odata.org/
Acronyms
API Application Programming Interface
BMC Baseboard Management Controller
DMTF Distributed Management Task Force
DSP DMTF Standard Publications
FQDD Fully Qualified Device Descriptor
HTTP Hyper Text Transfer Protocol
HTTPS HTTP Secure or HTTP over TLS/SSL
iDRAC Integrated Dell Remote Access Controller
IPMI Intelligent Platform Management Interface
JSON Java Script Object Notation
LC Lifecycle Controller
OData Open Data Protocol
OOB Out-of-Band
REST Representational State Transfer
SNMP Simple Network Management Protocol
SPMF Scalable Platforms Management Forum
SSL Secure Sockets Layer
TLS Transport Layer Security
URI Uniform Resource Identifier