REST API support for ASA r2
The ASA r2 REST API is based on the REST API provided with the unified ONTAP personality, with a number of changes adapted to the unique characteristics and capabilities of the ASA r2 personality.
Types of API changes
There are several types of differences between the ASA r2 system REST API and the unified ONTAP REST API available with FAS, AFF, and ASA systems. Understanding the types of changes will help you better utilize the online API reference documentation.
Several endpoints have been added to the ASA r2 REST API which are not available with unified ONTAP.
For example, a new block-volume endpoint has been added to the REST API for ASA r2 systems. The block-volume endpoint provides access to both LUN and NVMe namespace objects, enabling an aggregated view of the resources. This is only available through the REST API.
As another example, the storage-units endpoints provide an aggregated view of the LUNs and NVMe namespaces. There are several endpoints and they're all based on or derived from /api/storage/storage-units
. You should also review /api/storage/luns
and /api/storage/namespaces
.
Several endpoints available with ASA r2 have restrictions on which HTTP methods can be used as compared with unified ONTAP. For example, POST and DELETE are not allowed when using the endpoint /api/protocols/nvme/services
with ASA r2 systems.
Some ASA r2 system endpoint and method combinations do not support all the defined properties available in the unified ONTAP personality. For example, when using PATCH with the endpoint /api/storage/volumes/{uuid}
, several properties are not supported with ASA r2, including:
-
autosize.maximum
-
autosize.minimum
-
autosize.mode
There are several changes to how ASA r2 processes certain REST API requests. For example, a DELETE request with the endpoint /api/storage/luns/{uuid}
is processed asynchronously.
Enhanced security with OAuth 2.0
OAuth 2.0 is the industry standard authorization framework. It's used to restrict and control access to protected resources based on signed access tokens. You can configure OAuth 2.0 using System Manager to protect ASA r2 system resources.
After OAuth 2.0 is set up with System Manager, access by the REST API clients can be controlled. You need to first obtain an access token from an authorization server. The REST client then passes the token to the ASA r2 cluster as a bearer token using the HTTP authorization request header. See Authentication and authorization using OAuth 2.0 for more information.
Access the ASA r2 API reference documentation through the Swagger UI
You can access the REST API reference documentation through the Swagger UI at your ASA r2 system.
You should access the ASA r2 reference documentation page for details about the REST API. As part of this, you can search for the string Platform Specifics to find details about ASA r2 system support for the API calls and properties.
You must have the following:
-
IP address or host name of the ASA r2 system’s cluster management LIF
-
User name and password for an account with authority to access the REST API
-
Type the URL in your browser and press Enter:
https://<ip_address>/docs/api
-
Sign in using your administrator account.
The ASA r2 API documentation page is displayed with the API calls organized in major resource categories.
-
To see an example of an API call that’s specifically applicable only to ASA r2 systems, scroll down to the SAN category and click GET /storage/storage-units.