<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the API call to show/hide .snapshot directory? in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159526#M3081</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/2305"&gt;@mbeattie&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Promising, as this looks like it toggles what I want.&amp;nbsp; All of the automation I've written so far is in python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not familiar with ZAPI a bit of searching did not turn up much but I did find "...&amp;nbsp;&lt;SPAN&gt;NetApp tools or proprietary ZAPI via the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://mysupport.netapp.com/documentation/docweb/index.html?productID=62611&amp;amp;language=en-US" target="_blank" rel="noopener"&gt;ONTAP SDK&lt;/A&gt;".&amp;nbsp; Then I found post from 2008 of someone having trouble running a secure connection using perl scripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is ZAPI some interface that's addressable only via some non-restful interface?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Sep 2020 01:42:12 GMT</pubDate>
    <dc:creator>milk</dc:creator>
    <dc:date>2020-09-19T01:42:12Z</dc:date>
    <item>
      <title>What is the API call to show/hide .snapshot directory?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159463#M3079</link>
      <description>&lt;P&gt;I have been led to believe that all of the interactions in the ONTAP System Manager UI map to API calls but I cannot seem to find the call that toggles visibility of the .snapshot directory as seen in the 'Configure Snapshot Copy Settings' dialogue after selecting Storage &amp;gt; Volume &amp;gt; VOLUME_NAME.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-09-16 at 12.28.31 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.netapp.com/t5/image/serverpage/image-id/10085iCABE6ACE3AD91561/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2020-09-16 at 12.28.31 PM.png" alt="Screen Shot 2020-09-16 at 12.28.31 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I have dug through the API documentation (&lt;A href="https://library.netapp.com/ecmdocs/ECMLP2856304/html/index.html" target="_blank"&gt;https://library.netapp.com/ecmdocs/ECMLP2856304/html/index.html&lt;/A&gt;) and see no reference to the .snapshot dir.&amp;nbsp; I also know that the "Preview the new experience" has an option to show all the API calls but the .snapshot directory visibility toggle is missing in the preview.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am no web developer but was able to identify the component in the console of my browser (&lt;SPAN&gt;id="gwt-debug-netapp-clSnapshotConfigureDialogEnableScheduleCheckBox") but it ended up not being so helpful to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:53:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159463#M3079</guid>
      <dc:creator>milk</dc:creator>
      <dc:date>2025-06-04T10:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the API call to show/hide .snapshot directory?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159477#M3080</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I doesn't look like this is available via the REST API to enable\disable access to view the .snapshot directory for a volume.&lt;/P&gt;
&lt;P&gt;There is a ZAPI available thought. EG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.170"&amp;gt;
  &amp;lt;volume-modify-iter&amp;gt;
    &amp;lt;attributes&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;name&amp;gt;cifs_data_001&amp;lt;/name&amp;gt;
          &amp;lt;owning-vserver-name&amp;gt;vserver1&amp;lt;/owning-vserver-name&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
        &amp;lt;volume-snapshot-attributes&amp;gt;
          &amp;lt;snapdir-access-enabled&amp;gt;false&amp;lt;/snapdir-access-enabled&amp;gt;
        &amp;lt;/volume-snapshot-attributes&amp;gt;
      &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/attributes&amp;gt;
    &amp;lt;max-records&amp;gt;1&amp;lt;/max-records&amp;gt;
    &amp;lt;query&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;name&amp;gt;cifs_data_001&amp;lt;/name&amp;gt;
          &amp;lt;owning-vserver-name&amp;gt;vserver1&amp;lt;/owning-vserver-name&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
        &amp;lt;volume-snapshot-attributes&amp;gt;
          &amp;lt;snapdir-access-enabled&amp;gt;true&amp;lt;/snapdir-access-enabled&amp;gt;
        &amp;lt;/volume-snapshot-attributes&amp;gt;
      &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/query&amp;gt;
  &amp;lt;/volume-modify-iter&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;The above will disable the snapshot dir access for the volume.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;cluster1::&amp;gt; vol show -vserver vserver1 -volume cifs_data_001 -fields snapdir-access
vserver  volume        snapdir-access
-------- ------------- --------------
vserver1 cifs_data_001 false
&lt;/LI-CODE&gt;
&lt;P&gt;To enable it again reverse the true\false parameters. EG:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.170"&amp;gt;
  &amp;lt;volume-modify-iter&amp;gt;
    &amp;lt;attributes&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;name&amp;gt;cifs_data_001&amp;lt;/name&amp;gt;
          &amp;lt;owning-vserver-name&amp;gt;vserver1&amp;lt;/owning-vserver-name&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
        &amp;lt;volume-snapshot-attributes&amp;gt;
          &amp;lt;snapdir-access-enabled&amp;gt;true&amp;lt;/snapdir-access-enabled&amp;gt;
        &amp;lt;/volume-snapshot-attributes&amp;gt;
      &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/attributes&amp;gt;
    &amp;lt;max-records&amp;gt;1&amp;lt;/max-records&amp;gt;
    &amp;lt;query&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;name&amp;gt;cifs_data_001&amp;lt;/name&amp;gt;
          &amp;lt;owning-vserver-name&amp;gt;vserver1&amp;lt;/owning-vserver-name&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
        &amp;lt;volume-snapshot-attributes&amp;gt;
          &amp;lt;snapdir-access-enabled&amp;gt;false&amp;lt;/snapdir-access-enabled&amp;gt;
        &amp;lt;/volume-snapshot-attributes&amp;gt;
      &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/query&amp;gt;
  &amp;lt;/volume-modify-iter&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;The above enables access to the .snapshot directory. EG&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;cluster1::&amp;gt; vol show -vserver vserver1 -volume cifs_data_001 -fields snapdir-access
vserver  volume        snapdir-access
-------- ------------- --------------
vserver1 cifs_data_001 true
&lt;/LI-CODE&gt;
&lt;P&gt;What programming language are you using to to invoke API's???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 04:33:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159477#M3080</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2020-09-17T04:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: What is the API call to show/hide .snapshot directory?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159526#M3081</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/2305"&gt;@mbeattie&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Promising, as this looks like it toggles what I want.&amp;nbsp; All of the automation I've written so far is in python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not familiar with ZAPI a bit of searching did not turn up much but I did find "...&amp;nbsp;&lt;SPAN&gt;NetApp tools or proprietary ZAPI via the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://mysupport.netapp.com/documentation/docweb/index.html?productID=62611&amp;amp;language=en-US" target="_blank" rel="noopener"&gt;ONTAP SDK&lt;/A&gt;".&amp;nbsp; Then I found post from 2008 of someone having trouble running a secure connection using perl scripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is ZAPI some interface that's addressable only via some non-restful interface?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2020 01:42:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159526#M3081</guid>
      <dc:creator>milk</dc:creator>
      <dc:date>2020-09-19T01:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is the API call to show/hide .snapshot directory?</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159536#M3082</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the XML here is a Python example using the NMSDK libraries:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import sys
sys.path.append("&amp;lt;path_to_nmsdk_root&amp;gt;/lib/python/NetApp")
from NaServer import *

s = NaServer("&amp;lt;server name or IP address&amp;gt;", 1 , 170)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("&amp;lt;user name&amp;gt;", "&amp;lt;password&amp;gt;")

api = NaElement("volume-modify-iter")

xi = NaElement("attributes")
api.child_add(xi)

xi1 = NaElement("volume-attributes")
xi.child_add(xi1)

xi2 = NaElement("volume-id-attributes")
xi1.child_add(xi2)

xi2.child_add_string("name","cifs_data_001")
xi2.child_add_string("owning-vserver-name","vserver1")

xi3 = NaElement("volume-snapshot-attributes")
xi1.child_add(xi3)

xi3.child_add_string("snapdir-access-enabled","false")
api.child_add_string("max-records","1")

xi4 = NaElement("query")
api.child_add(xi4)

xi5 = NaElement("volume-attributes")
xi4.child_add(xi5)

xi6 = NaElement("volume-id-attributes")
xi5.child_add(xi6)

xi6.child_add_string("name","cifs_data_001")
xi6.child_add_string("owning-vserver-name","vserver1")

xi7 = NaElement("volume-snapshot-attributes")
xi5.child_add(xi7)

xi7.child_add_string("snapdir-access-enabled","true")

xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
    print ("Error:\n")
    print (xo.sprintf())
    sys.exit (1)

print ("Received:\n")
print (xo.sprintf())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 04:24:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/What-is-the-API-call-to-show-hide-snapshot-directory/m-p/159536#M3082</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2020-09-21T04:24:39Z</dc:date>
    </item>
  </channel>
</rss>

