跳转到主内容

具有自定义角色的用户无法使用命令行界面直通REST API

Views:
2
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core<a>2009590292</a>
Last Updated:

适用场景

  • ONTAP 9.6 及更高版本
  • 专用命令行界面直通REST API

问题描述

示例:

[API]:

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

[响应]:

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

  • 但是、对于同一用户、专用命令行界面REST API失败并显示以下错误:

示例:

[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"

[响应]:

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

  • REST API (标准API和命令行界面直通API)对管理员用户正常工作。 

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.