Accessing the ONTAP CLI through the REST API

Contributors dmp-netapp

To assist CLI and ONTAPI API users in their transition to the ONTAP REST API, ONTAP provides a REST endpoint to access the CLI. You can use this passthrough feature to execute any CLI command. Usage of the REST endpoint is returned in AutoSupport data so NetApp can identify gaps in the REST API and make improvements in future releases.

To issue a CLI command, you must make a REST API call that is properly formed based on rules regarding:

  • 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 maintains a GitHub repository containing code samples and other helpful information. You can access the repository for examples of how to use the CLI passthrough facility.