The gateway APIs act as a gateway to invoke ONTAP APIs to query information about your ONTAP storage objects and take remedial measures to address the reported issues.
This workflow takes up a sample use case in which an event is raised when an ONTAP volume almost reaches its capacity. The workflow also demonstrates how to address this issue by invoking a combination of Active IQ Unified Manager and ONTAP REST APIs.
You are aware of the gateway APIs and how they are used. For information, see the Gateway APIs
section.
The following diagram illustrates each step in the workflow for troubleshooting the issue of ONTAP volume capacity use.
The workflow covers the invocation points of both the Unified Manager and ONTAP REST APIs.
Category | HTTP verb | Path |
---|---|---|
datacenter | GET |
/datacenter/storage/volumes |
For running the ONTAP APIs through API gateway, the Unified Manager credentials are passed internally for authentication, and you do not need to run an additional authentication step for individual cluster access.
Category | HTTP verb | Path |
---|---|---|
Unified Manager: gateway ONTAP: storage |
GET |
Gateway API: /gateways/{uuid}/{path} ONTAP API: /storage/volumes/{uuid} |
The appended URL is: /gateways/{cluster_uuid}/storage/volumes/{volume_uuid}
On running the GET operation, the generated URL is: GET https://<hostname>/api/gateways/<cluster_UUID>/storage/volumes/{volume_uuid}
curl -X GET "https://<hostname>/api/gateways/1cd8a442-86d1-11e0-ae1c-9876567890123/storage/volumes/028baa66-41bd-11e9-81d5-00a0986138f7" -H "accept: application/hal+json" -H "Authorization: Basic <Base64EncodedCredentials>"
Category | HTTP verb | Path |
---|---|---|
Unified Manager: gateway ONTAP: storage |
PATCH |
Gateway API: /gateways/{uuid}/{path} ONTAP API: /storage/volumes/{uuid} |
curl -X PATCH "https://<hostname>/api/gateways/1cd8a442-86d1-11e0-ae1c-9876567890123/storage/volumes/028baa66-41bd-11e9-81d5-00a0986138f7" -H "accept: application/hal+json" -H "Authorization: Basic <Base64EncodedCredentials>" -d {\"size\": 128849018880}"
The JSON output returns a Job UUID.
Category | HTTP verb | Path |
---|---|---|
Unified Manager: gateway ONTAP: cluster |
GET |
Gateway API: /gateways/{uuid}/{path} ONTAP API: /cluster/jobs/{uuid} |
The HTTP codes returned are the same as the ONTAP REST API HTTP status codes.
Category | HTTP verb | Path |
---|---|---|
Unified Manager: gateway ONTAP: storage |
GET |
Gateway API: /gateways/{uuid}/{path} ONTAP API: /storage/volumes/{uuid} |
The output displays an increased volume size of 120 GB.