Skip to main content
ONTAP automation

How to access the ONTAP REST API

Contributors dmp-netapp

You can access the ONTAP REST API in several different ways.

Network considerations

You can connect to the ONTAP REST API using one of several types of interfaces. The LIF you choose needs to be configured to support the HTTPS management protocol. Also, the firewall configuration in your network must allow the HTTPS traffic. The following interfaces are supported:

  • Cluster management LIF

  • Node management LIF

  • SVM management LIF

While you can use any of these LIFs, the recommended best practice is to use the cluster management LIF. This allows the cluster to be addressed as a single logical unit and provides the highest level of resiliency and load balancing. A cluster LIF can relocate in the cluster as needed to handle planned upgrades, quorum events, and other connectivity issues. If you have multiple cluster management LIFs configured, they are all equivalent regarding access to the REST API. The SVM management LIFs are also load balanced but requests sent to LIFs scoped at a node level are handled locally.

ONTAP API online documentation page

The ONTAP API online documentation page provides an access point when using a web browser. In addition to providing a way to execute individual API calls directly, the page includes a detailed description of the API, including input parameters and other options for each call. The API calls are organized into functional categories. See Summary of the REST resources for more information.

The format of the URL used to access the documentation page for the most recent version of the API is:

https://<cluster_mgmt_ip_address>/docs/api

Custom software and tools

You can access the ONTAP API using any of several different programming languages and tools. Popular choices include Python, Java, Curl, and PowerShell. A program, script, or tool that uses the API acts as a REST web services client. Using a programming language enables a deeper understanding of the API and provides an opportunity to automate the ONTAP administration.

The format of the base URL used to directly access the most recent version of the API is:

https://<cluster_mgmt_ip_address>/api

To access a specific API version where multiple versions are supported, the format of the URL is:

https://<cluster_mgmt_ip_address>/api/v1