REST role not working as expected for /api/cloud/targets
Applies to
- ONTAP 9.12.1
- REST API
Issue
A custom role set up with access level: all
for /api/cloud/targets
API's.
::> security login rest-role show -api /api/cloud/targets -vserver <vserver_name>
Role Access
Vserver Name API Level
-------------- ------------- ------------------- ------
<vserver_name> <role_name>
/api/cloud/targets all
Attempt to GET the information fails with the error:
curl -k -X GET -u <user_name>:<password> https://<cluster_mgmt_IP or hostname>/api/cloud/targets -H "accept: application/json"
{
"error": {
"message": "not authorized for that command",
"code": "6"
}