Skip to main content
NetApp Knowledge Base

CLI passthrough REST APIs not working for a user with a custom role

Views:
195
Visibility:
Public
Votes:
2
Category:
ontap-9
Specialty:
core
Last Updated:

Applies to

  • ONTAP 9.6 and later
  • Private CLI passthrough REST API

Issue

Example:

[API]:

curl -kX GET https://<cluster-mgmt>/api/cloud/targets?return_records=true&return_timeout=15 -H  "accept: application/json" -H  "authorization: Basic fwXXXXXXXXXXdf"

[RESPONSE]:

{
  "records": [
    {
      "uuid": "14XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXc8",
      "name": "os1"
    }
  ],
  "num_records": 1
}

  • However, for the same user, the private CLI REST APIs fail with the error:

Example:

[API]:

curl -X GET https://<cluster-mgmt>/api/private/cli/storage/aggregate/object-store?fields=object-store-availability -H "accept: application/json" -H "authorization: Basic fwXXXXXXXXXXdf"

[RESPONSE]:

{
  "error": {
    "message": "API not found",
    "code": "3"
  }
}

  • REST APIs (Standard and CLI passthrough both) working normally for the admin user. 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.