Migration considerations for the ONTAP REST API
The ONTAPI API (ZAPI) is the original set of proprietary calls included with the NetApp ONTAP software. The API is provided through the Network Manageability SDK and supports the automation of data storage administration and management tasks. If you are using ONTAPI, you should plan your migration to the ONTAP REST API to take advantage of the expanded ONTAP feature set available with the REST API.
General design differences
The ONTAP REST API and command line interface have a fundamentally different designs. The CLI commands and parameters do not map directly to the REST API calls. And even where there might be a similarity, the details of the input parameters can be different. For example, numeric units might be specified in bytes or using a suffix (such as KB). See Input variables controlling an API request and API reference for more information.
Data SVMs exposed through the REST API
ONTAP supports several types of storage virtual machines (SVMs). However, only the data SVMs are directly exposed through the ONTAP REST API. The configuration information describing the cluster and nodes is available through the REST API, however the cluster and nodes are not treated as separate SVMs.
Access the ONTAP CLI through the REST API
To assist ONTAPI API and CLI users in their transition to the ONTAP REST API, ONTAP provides a REST endpoint to access the ONTAP CLI. You can use this passthrough feature to execute any CLI command. Use of the REST endpoint is returned in AutoSupport data so NetApp can identify gaps in the REST API and make improvements in future ONTAP releases.
To issue a CLI command, you must make a REST API call that is properly formed based on rules regarding the following:
-
Resource paths
-
Field names
-
HTTP methods
The base resource path for CLI access is /private/cli
. Refer to the ONTAP API online documentation page for details about accessing the CLI through the REST API. NetApp also maintains a GitHub repository containing code samples and other helpful information. See ONTAP REST Python GitHub repository - CLI passthrough samples for more information.
Changes to SnapDiff availability in ONTAPI
Beginning with ONTAP 9.10.1, the SnapDiff v1 and v2 ONTAPI calls cannot be invoked. Any third-party application that invokes SnapDiff v1 or v2 ONTAPI calls will not function beginning with ONTAP 9.10.1. ONTAP users should verify that their backup application supports the SnapDiff v3 REST calls before upgrading to ONTAP 9.10.1.
SnapDiff API availability across ONTAP releases is defined as follows:
-
ONTAP 9.7 and earlier releases: v1 and v2 (ONTAPI only)
-
ONTAP 9.8 – 9.9.1: v1, v2 and v3 (both ONTAPI and REST API)
-
ONTAP 9.10.1 and later: v3 only (REST API only)
Support was withdrawn at different points in each release. This includes ONTAP 9.10.1 P11 and later, 9.11.1 P7 and later, and 9.12.1 GA and later. See the ONTAP Release Notes for more information.