Exploring the Pure1® REST API, Part 1

In Part 1 of our 3-part series, we give you an overview of the Pure1 REST API and how its endpoints currently map to its graphical user interface.

Pure1 REST API

5 minutes

Want to get more familiar with the Pure1 REST API? Download our brand new Pure1 Postman collection and start testing the 100+ (and growing!) sample requests we have put together. Then put it to good use in your Python applications with the Pure Python client and in your PowerShell scripts with the Pure1 PowerShell module. Go developers, we got your back with the Pure Storage Pure1 Go library as well!

Introduction

This blog post series on the Pure1® REST API is divided into 3 parts:

  • Part 1 (this post) provides an overview of the Pure1 REST API and how its endpoints currently map to its graphical user interface.
  • Part 2 goes over setting up authentication with the Pure1 REST API, and dives into the sorting and pagination capabilities of the API
  • Part 3 concludes with the API’s filtering capabilities and the specifics of the Metrics History API endpoint.

What is Pure1 again?

Why do Pure Storage customers love us so much? Beyond technical prowesses, customers are human beings and as such, they relish personal attention. Pure1, our storage management SaaS service, allows us to deliver peace of mind, customized care and proactive support – at scale. How do we do so?

The minute a FlashArray™ or FlashBlade™ appliance is connected to the Internet, it starts sending live metadata and logs to Pure1. This provides two major benefits to our customers: not only does it allow them to have a single pane of glass of all their Pure Storage appliances wherever they are at any point in time, but it also allows us to make usage and health predictions based on AI/ML algorithms powering Pure1 Meta™. Using these predictions, we can proactively notify our customers of preventive actions we suggest they take. Along with the high quality of the products we ship, this proactive support experience drives our very high customer satisfaction, which is consistently and independently validated by our superior Net Promoter Score (one of the highest in our industry).

While GUIs (Graphical User Interfaces) are visually appealing and actionable to administrators, they can only go so far in delivering value in an API-connected world. Today, we are delighted to announce that Pure1 can now fulfill the needs of administrators and developers alike.

Introducing the Pure1 REST API Postman collection

At Pure Storage, we believe in the power of automation and integration to make our customers’ lives more predictable, efficient and ultimately more enjoyable. To that end, we design our products to be API first-class citizens. To be clear, we’re not talking about ancient APIs available only in specific programming languages and operating systems, or even some earlier API technologies, such as CORBA and SOAP, which are notoriously complex for developers to use. We’re talking about modern, universal REST-based APIs that are easy to use and leverage in popular development languages, such as Python, PowerShell, Ruby and Go. These libraries in turn make it simple to build Infrastructure-as-Code modules with modern frameworks such as Ansible, Terraform and Puppet.

From the outset, both our flagship FlashArray and FlashBlade products were built with API readiness in mind. You can indeed discover the multitude of integrations built on top these REST APIs at https://code.purestorage.com. As we continue to innovate and make Pure1 even more actionable, we recently introduced the Pure1 REST API, which allows our customers to programmatically retrieve the data they can already visualize in the Pure1 web user interface.

Typical use cases of the Pure1 REST API include building offline reports to share with other corporate stakeholders, integration with monitoring tools such as Prometheus and Grafana or custom dashboards for easy consumption. Another great use case is for enterprise IT to use Pure1 REST API to integrate with their existing investments in analytics or service automation tools.

On top of the exhaustive REST API reference as well as our Swagger documentation, I am happy to announce the availability of the Pure1 Postman collection you can now use to quickly discover the power and richness of the Pure1 REST API. In this blog post, I will attempt to showcase the main endpoints exposed through the REST API, as well as some useful tips and tricks to make the most of its “hidden” capabilities.

Mapping API Endpoints to the Pure1 GUI

Before delving into the technical aspscts of the API, let’s explore the endpoints exposed by the Pure1 REST API. As of the time of writing (April 2019), the API has 7 primary endpoints, represented by the top folders of the Postman collection:

Pure1 Postman collection folder view

The Appliances (/arrays), Volumes (/volumes), Pods (/pods) and File Systems (/file-systems) endpoints let you get some general information about your Pure main objects, by adopting the same visual structure of the Analytics → Performance page tabs.

Pure1 UI Performance Page

The Alerts (/alerts) endpoint exposes alert data displayed in the Messages → Alerts page:

Pure1 UI Alerts Page

The Audits (/audits) endpoint provides programmatic access to all the internal provisioning and de-provisioning operations captured by Pure appliances, such as creating/removing volumes, hosts, snapshots, volumes copies and much more.

Pure1 UI Audits Page

Last but not least, the Metrics History (/metrics/history) endpoint enables you to extract historical data about the four Pure Storage objects (appliances/arrays, volumes, pods and file systems) Pure1 currently tracks. This metrics history is visually available in the bottom part of each tab of the Analytics → Performance page.

Pure1 Array Performance Metrics History Graphs

For arrays specifically, additional metrics information is visually accessible in the Analytics → Capacity page:

Pure1 Capacity Page

That’s it for my introduction to the Pure1 REST API blog post series. In Part 2, I’ll dive into the technical details of the Pure1 REST API. Click here to read it now!