ONTAP Discussions

Ontap API volume delete - not authorised for that command

DanielBrady
288 Views

Hi,

 

I'm using the Python Netapp libraries to create some scripts to allow users to create and delete volumes on a specific svm.  The user was created with security login create and assigned a rest-role.  The create function works but delete fails with a message.

job failed: not authorised for that command.

 

if I replace the limited user with the admin user the delete command succeeds, I suspect I'm missing a privilege somewhere but I'm not sure where to look, we're on NetApp Release 9.14.1

 

any suggestions/help would be greatly appreciated.

 

Thanks in Advance.

Daniel 

2 REPLIES 2

chamfer
222 Views

Hi @DanielBrady ,

 

So the python netapp_ontap uses REST API netapp-ontap · PyPI

 

NetApp documentation is here Work with roles and users in the ONTAP REST API

 

Sounds like that you need to have to:

  1. Create a Role with API access (REST API path) of /api/storage/volumes with Access level of Read/write
  2. Create a user with HTTP Application access and the role that you added above.

 

Also you can access the ONTAP REST API documentation through the Swagger UI at your local ONTAP system.

  1. Type the URL in your browser and press Enter:

  2. Sign in using the ONTAP account.

    The ONTAP API documentation page is displayed with the API calls organized in major resource categories at the bottom.

  3. As an example of an individual API call, scroll down to the cluster category and click GET /cluster.

Reference for the ONTAP REST API

Sanaman
203 Views

I would run the python script to delete the volume and then check the audit log file to see which library is missing.

 

Ex: 

security audit log show -timestamp >10/29/2025 15:45:00 (change the time stamp as required) 

If you can run it from a Linux box you can then use grep or something to extract error.

 

Good Luck

Public