Unity has a REST API!

For all of you that have been asking for a REST API for EMC's midrange arrays, we are excited to announce that Unity has a full featured REST API. All of the management functionality available from the CLI and GUI is also in the new REST API.

 

All of the information about how to use REST in general is in the Unity REST Programmers Guide (pdf), and the specifics of all the individual APIs are in the Unity REST Programmers Reference (.zip of the html doc files). The specific docs for your array are always available to an authenticated administrative user from https://<mgmt IP>/apidocs/index.html.

 

To get started, take a look at the Programmer's Guide referenced above. One easy way to try out the REST API is to use a REST plugin for your browser. Two popular ones are RESTClient for Firefox, and Postman for Chrome. In a browser, the simplest way to authenticate is to log into Unisphere in another tab, and then use REST in the REST plugin in a different tab of the browser, piggybacking on the same login session.

 

For basic scripting in Perl, get the REST::Client and JSON libraries, check out their how-to information if you aren't familiar with them, and take a look at the attached simple script that authenticates, gets the list of pools are on the array, creates a 1GB LUN in the largest pool, and finally deletes the lun it just created to clean up after itself.

 

We welcome your sample REST code or script contributions if you create something you can share.