Can anyone help me with providing the correct syntax to enable/disable file system analytics? I am specifically trying to use the CLI command method through the REST API. So. Using the REST API explicitly to enable/disable file system analytics for a specific volume does work using the following syntax: curl -siku admin:Netapp1! -X PATCH "https://cluster1/api/storage/volumes/d3573f3b-2db8-11ef-8c73-005056b7beb4" -d '{"analytics.state":"off"}' However, trying to use the equivalent above command via CLI through REST API doesnt work? curl -siku admin:Netapp1! --request PATCH "https://cluster1/api/private/cli/volume?vserver=svm1_cluster1&volume=vol1" -d '{"analytics":"on"}' HTTP/1.1 400 Bad Request curl -siku admin:Netapp1! --request PATCH "https://cluster1/api/private/cli/volumes/e128068c-2db8-11ef-a91a-005056b765ba" -d '{"analytics.state":"on"}' HTTP/1.1 404 Not Found curl -siku admin:Netapp1! -X PATCH "https://cluster1/api/private/cli/volume/analytics?volume=vol1" -d '{"analytics.state":"on"}' HTTP/1.1 405 Method Not Allowed I believe I am close. But I dont seem to be using the right syntax using the CLI command through REST API method. Any help would be appreciated.
... View more
Hello, I'm trying to display file permissions using rest-api. I have an old vserver and it does not work when SECD cannot resolve SID. It's fine using ZAPI. It displays SID when it cannot resolve to windows name. GET https://ip/api/protocols/file-security/permissions/c26b5fac-1135-11ea-a956-00a098d1acc2/%2FVOLUME%2FDIR%2FSUBDIR User-Agent: python-requests/2.28.1 Accept-Encoding: gzip, deflate Accept: */* Connection: keep-alive X-Dot-Client-App: netapp-ontap-python-9.11.1.0 Authorization: Basic aW52ZW50YWlyZTpZb3VwbGFib3VtMzA= None ----------------------------- DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one. DEBUG:netapp_ontap.host_connection: -----------RESPONSE----------- 404 Not Found Date: Thu, 02 Feb 2023 10:48:14 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors: 'self' Content-Length: 144 Content-Type: application/hal+json Keep-Alive: timeout=5, max=99 Connection: Keep-Alive { "error": { "message": "Failed to convert SID to a Windows name. Reason: \"SecD Error: object not found\". ", "code": "4849677" } } ------------------------------ Traceback (most recent call last): File "/home/XXXXXX/projects/reporting_acls/test.py", line 14, in <module> resource.get() File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/resources/file_directory_security.py", line 1048, in get return super()._get(**kwargs) File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/utils.py", line 55, in wrapper return on_api_fail(erro) File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/utils.py", line 78, in on_api_fail raise NetAppRestError(cause=erro) from None netapp_ontap.error.NetAppRestError: Caused by HTTPError('404 Client Error: Not Found for url: https://IP:443/api/protocols/file-security/permissions/c26b5fac-1135-11ea-a956-00a098d1acc2/%2FVOLUME%2FDIR%2FSUBDIR'): Failed to convert SID to a Windows name. Reason: "SecD Error: object not found".
... View more
Hi Everyone, I'm facing below issue when trying to delete a snapshot from which a volume is cloned. Is this because the cloned volume has not been split from source yet ? Exception in deleting snapshot:Job failed: Snapshot copy "<snaphostid>" of volume "<volumename>" in Vserver "<hostname>" has not expired or is locked. Use the "snapshot show -fields owners, expiry-time, snaplock-expiry-time" command to view the expiry and lock status of the Snapshot copy. Kalyan
... View more
Hi, REST API returns "msid" for each reported volume, but how do I get the "flexgroup-msid" which can be displayed via CLI? My goal is to find the flexgroup volume for a given "flexgroup-msid" and I would expect that the "flexgroup-msid" is the same as the "msid" of the flexgroup itself, but this seems not to be the case. Thanks, dg.
... View more