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
SnapDiff v1 and v2 are based on the ONTAPI (ZAPI) management framework and there are some usability limitations with certain versions of ONTAP. The SnapDiff v3 API does not use ONTAPI and is supported with ONTAP 9.8 and later releases. SnapDiff API availability across ONTAP releases is defined as follows:
-
ONTAP 9.7 and earlier releases: v1 and v2 (ONTAPI only)
-
ONTAP 9.8 and later releases: v1, v2 and v3. Some limitations apply; see the FAQ: SnapDiff Support in ONTAP for more details on SnapDiff support based on the ONTAP release.
You should verify that your backup applications support SnapDiff and be aware of any interoperability limitations based on the ONTAP version you're using. Also see the ONTAP Release Notes for more information.