Hi,
I doesn't look like this is available via the REST API to enable\disable access to view the .snapshot directory for a volume.
There is a ZAPI available thought. EG
<?xml version="1.0" encoding="UTF-8"?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.170">
<volume-modify-iter>
<attributes>
<volume-attributes>
<volume-id-attributes>
<name>cifs_data_001</name>
<owning-vserver-name>vserver1</owning-vserver-name>
</volume-id-attributes>
<volume-snapshot-attributes>
<snapdir-access-enabled>false</snapdir-access-enabled>
</volume-snapshot-attributes>
</volume-attributes>
</attributes>
<max-records>1</max-records>
<query>
<volume-attributes>
<volume-id-attributes>
<name>cifs_data_001</name>
<owning-vserver-name>vserver1</owning-vserver-name>
</volume-id-attributes>
<volume-snapshot-attributes>
<snapdir-access-enabled>true</snapdir-access-enabled>
</volume-snapshot-attributes>
</volume-attributes>
</query>
</volume-modify-iter>
</netapp>
The above will disable the snapshot dir access for the volume.
cluster1::> vol show -vserver vserver1 -volume cifs_data_001 -fields snapdir-access
vserver volume snapdir-access
-------- ------------- --------------
vserver1 cifs_data_001 false
To enable it again reverse the true\false parameters. EG:
<?xml version="1.0" encoding="UTF-8"?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.170">
<volume-modify-iter>
<attributes>
<volume-attributes>
<volume-id-attributes>
<name>cifs_data_001</name>
<owning-vserver-name>vserver1</owning-vserver-name>
</volume-id-attributes>
<volume-snapshot-attributes>
<snapdir-access-enabled>true</snapdir-access-enabled>
</volume-snapshot-attributes>
</volume-attributes>
</attributes>
<max-records>1</max-records>
<query>
<volume-attributes>
<volume-id-attributes>
<name>cifs_data_001</name>
<owning-vserver-name>vserver1</owning-vserver-name>
</volume-id-attributes>
<volume-snapshot-attributes>
<snapdir-access-enabled>false</snapdir-access-enabled>
</volume-snapshot-attributes>
</volume-attributes>
</query>
</volume-modify-iter>
</netapp>
The above enables access to the .snapshot directory. EG
cluster1::> vol show -vserver vserver1 -volume cifs_data_001 -fields snapdir-access
vserver volume snapdir-access
-------- ------------- --------------
vserver1 cifs_data_001 true
What programming language are you using to to invoke API's???
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.