Reference Guide
Prerequisites and Audience
This paper assumes the reader is familiar with HTTP operations and RESTful web service APIs. The reader should be familiar with JSON and UTF-8 encoding as well as HTTP operations and
headers.
This paper is a reference and is intended to be used in conjunction with the paper entitled "Managing HP Servers Using the HP RESTful API." This other document is an introduction to using
the HP RESTful API, while this document provides detail on individual properties and messages.
First Things
HP Moonshot running Chassis Manager 1.30 or later features a new management interface called the “HP RESTful API.” The HP RESTful API is a RESTful Web Service API served by iLO’s web
server. If you are familiar with RESTful APIs, this should tell you much about how the API works. In short, a RESTful API is an application programming interface using the basic HTTP
operations GET, PUT, POST, DELETE, and PATCH. Each HTTP operation either submits or returns a “resource” in the form of UTF-8 encoded JSON. Just as a Web application returns HTML to
your browser, a REST interface returns data (in the form of JSON) to your client over the same transport (HTTPS).
All modern scripting languages make it very easy to write simple REST clients for web services. Most, like Python can transform JSON into internal data structures like dictionaries, allowing for
easily access to data. This enables you to write custom code directly to the API instead of using intermediate tools.
If you are not familiar with RESTful APIs, you should pause and do internet research on the subject. This tutorial is intended to point out the things you must consider when creating a proper
client to interact with The HP RESTful API.
Key Benefits of the HP RESTful API
This HP RESTful API will become the main management API for Moonshot. Using this API you can take full inventory of the Moonshot enclosure, control power and reset, configure settings,
fetch event logs as well as many other things.
This API follows the trend of the Internet in moving to a common pattern for new software interfaces. Many web services in a variety of industries use REST APIs because they are easily to
implement, easy to consume, and offer scalability advantages over previous technologies. HP OneView, OpenStack, and many other server management APIs are now REST APIs. Most HP
Management software offerings as well as the entire Software Defined Data Center architecture is built upon REST APIs.
Requirements for using the HP RESTful API
The HP RESTful API for iLO is available on Moonshot servers running iLO Chassis Manager and does not require a license.
How to Use This Document
This document has three main sections.
The
Resource Map documents the resources in the data model including the URIs and types of the resources as well as the relationships between resources. Not all implementations of the
API will contain all the resources in this table and the model may expand in future versions of firmware.
The
Data Model Type Reference contains a chapter for each resource type and a section for each property in each resource type.
The Message Reference documents the MessageID values that may be returned in ExtendedError responses to HTTP operations.
Examples of using PATCH and POST to set properties and perform actions.