<?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 Get volume mapped CIFS shares with ONTAPI in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167819#M38450</link>
    <description>&lt;P&gt;&lt;FONT face="helvetica"&gt;I'm using ONTAPI version 1.3 and I'm trying to collect cifs share information. In the response XML I'm only seeing the volume name, I wish to get the volume UUID as well.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="helvetica"&gt;I'm using &lt;FONT face="courier new,courier"&gt;cifs-share-get-iter&lt;/FONT&gt;&amp;nbsp;to collect the cifs share information.&lt;BR /&gt;&lt;BR /&gt;Should I be using some other API to get the mapping with the volume uuid? I'm completely new to NetApp ecosystem so any help would be much appreciated.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:21:40 GMT</pubDate>
    <dc:creator>Madhurish</dc:creator>
    <dc:date>2025-06-04T10:21:40Z</dc:date>
    <item>
      <title>Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167819#M38450</link>
      <description>&lt;P&gt;&lt;FONT face="helvetica"&gt;I'm using ONTAPI version 1.3 and I'm trying to collect cifs share information. In the response XML I'm only seeing the volume name, I wish to get the volume UUID as well.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="helvetica"&gt;I'm using &lt;FONT face="courier new,courier"&gt;cifs-share-get-iter&lt;/FONT&gt;&amp;nbsp;to collect the cifs share information.&lt;BR /&gt;&lt;BR /&gt;Should I be using some other API to get the mapping with the volume uuid? I'm completely new to NetApp ecosystem so any help would be much appreciated.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:21:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167819#M38450</guid>
      <dc:creator>Madhurish</dc:creator>
      <dc:date>2025-06-04T10:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167828#M38452</link>
      <description>&lt;P&gt;ONTAP 9.6 and later leverages REST API calls. ONTAP 9.8 introduced CIFS sessions support for REST.&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="parisi_0-1623782675968.png" style="width: 400px;"&gt;&lt;img src="https://community.netapp.com/t5/image/serverpage/image-id/11721iA2142F2179BDCD8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="parisi_0-1623782675968.png" alt="parisi_0-1623782675968.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the relevant REST APIs you need via the following link:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://yourclustermgmtIP/docs/api" target="_blank"&gt;https://yourclustermgmtIP/docs/api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you login with your cluster creds. That gives a complete set of docs and even an "evaluate" button to test out/generate REST API calls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For CIFS share info, you could use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://yourclustermgmtIP/api/protocols/cifs/sessions?return_timeout=15&amp;amp;return_records=true&amp;amp;fields=client_ip,protocol" target="_blank"&gt;https://yourclustermgmtIP/api/protocols/cifs/sessions?return_timeout=15&amp;amp;return_records=true&amp;amp;fields=client_ip,protocol&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would give output like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "records": [
    {
      "node": {
        "uuid": "c981bb41-2cc9-11e6-bcc4-41d03af547fe",
        "name": "ontap9-tme-8040-01",
        "_links": {
          "self": {
            "href": "/api/cluster/nodes/c981bb41-2cc9-11e6-bcc4-41d03af547fe"
          }
        }
      },
      "svm": {
        "uuid": "7e3cc08e-d9b3-11e6-85e2-00a0986b1210",
        "name": "DEMO",
        "_links": {
          "self": {
            "href": "/api/svm/svms/7e3cc08e-d9b3-11e6-85e2-00a0986b1210"
          }
        }
      },
      "identifier": 5162532547850141697,
      "connection_id": 1011507766,
      "client_ip": "x.x.x.x",
      "protocol": "smb3",
      "_links": {
        "self": {
          "href": "/api/protocols/cifs/sessions/c981bb41-2cc9-11e6-bcc4-41d03af547fe/7e3cc08e-d9b3-11e6-85e2-00a0986b1210/5162532547850141697/1011507766"
        }
      }
    }
  ],&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jun 2021 18:48:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167828#M38452</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-15T18:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167837#M38456</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/11621"&gt;@parisi&lt;/a&gt;&amp;nbsp;for the explanation.&lt;BR /&gt;&lt;BR /&gt;I also have Clusters running ONTAP 8.3 Cluster mode, so I can't rely on RESTful APIs as the older version don't support REST APIs, is there any way that I can get the mappings without using the REST APIs?&lt;BR /&gt;&lt;BR /&gt;Any thoughts on this would be of great help. Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 05:14:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167837#M38456</guid>
      <dc:creator>Madhurish</dc:creator>
      <dc:date>2021-06-16T05:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167857#M38459</link>
      <description>&lt;P&gt;cifs-share-get-iter just gives you basic CIFS share info (such as the volume name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want the volume UUID, you'd need to use whatever volume name the ZAPI gave you and then use volume-get-iter for the UUID (which uses &amp;lt;uuid&amp;gt;):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, this ZAPI call would search for the volume name "home" and return the UUID:&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.21"&amp;gt;
  &amp;lt;volume-get-iter&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;home&amp;lt;/name&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
       &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/query&amp;gt;
    &amp;lt;desired-attributes&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;uuid&amp;gt;&amp;lt;/uuid&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
       &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/desired-attributes&amp;gt;
  &amp;lt;/volume-get-iter&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This is the result:&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;!DOCTYPE netapp SYSTEM "file:/etc/netapp_gx.dtd"&amp;gt;

&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.180"&amp;gt;
  &amp;lt;results status="passed"&amp;gt;
    &amp;lt;attributes-list&amp;gt;
      &amp;lt;volume-attributes&amp;gt;
        &amp;lt;volume-id-attributes&amp;gt;
          &amp;lt;name&amp;gt;home&amp;lt;/name&amp;gt;
          &amp;lt;owning-vserver-name&amp;gt;DEMO&amp;lt;/owning-vserver-name&amp;gt;
          &amp;lt;uuid&amp;gt;4b1e1bdf-af6f-11ea-ae2a-00a0986b1223&amp;lt;/uuid&amp;gt;
        &amp;lt;/volume-id-attributes&amp;gt;
      &amp;lt;/volume-attributes&amp;gt;
    &amp;lt;/attributes-list&amp;gt;
    &amp;lt;num-records&amp;gt;1&amp;lt;/num-records&amp;gt;
  &amp;lt;/results&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compare to the CLI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; vol show -vserver DEMO -volume home -fields uuid&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;vserver volume uuid&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;------- ------ ------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEMO&amp;nbsp; &amp;nbsp; home&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;4b1e1bdf-af6f-11ea-ae2a-00a0986b1223&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For CIFS session information,&amp;nbsp; you can use "cifs-session-get-iter"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what you'd see for that. No vol UUID there.&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;!DOCTYPE netapp SYSTEM "file:/etc/netapp_gx.dtd"&amp;gt;

&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.180"&amp;gt;
  &amp;lt;results status="passed"&amp;gt;
    &amp;lt;attributes-list&amp;gt;
      &amp;lt;cifs-session&amp;gt;
        &amp;lt;address&amp;gt;x.x.x.x&amp;lt;/address&amp;gt;
        &amp;lt;auth-mechanism&amp;gt;kerberos&amp;lt;/auth-mechanism&amp;gt;
        &amp;lt;connected-time&amp;gt;8d 3h 47m 29s&amp;lt;/connected-time&amp;gt;
        &amp;lt;connection-count&amp;gt;4&amp;lt;/connection-count&amp;gt;
        &amp;lt;connection-id&amp;gt;1011507766&amp;lt;/connection-id&amp;gt;
        &amp;lt;continuously-available&amp;gt;no&amp;lt;/continuously-available&amp;gt;
        &amp;lt;files&amp;gt;2&amp;lt;/files&amp;gt;
        &amp;lt;idle-time&amp;gt;6m 33s&amp;lt;/idle-time&amp;gt;
        &amp;lt;is-large-mtu-enabled&amp;gt;true&amp;lt;/is-large-mtu-enabled&amp;gt;
        &amp;lt;is-session-signed&amp;gt;false&amp;lt;/is-session-signed&amp;gt;
        &amp;lt;lif-address&amp;gt;x.x.x.y&amp;lt;/lif-address&amp;gt;
        &amp;lt;netbios-name&amp;gt;demo&amp;lt;/netbios-name&amp;gt;
        &amp;lt;node&amp;gt;node1&amp;lt;/node&amp;gt;
        &amp;lt;other&amp;gt;0&amp;lt;/other&amp;gt;
        &amp;lt;protocol-version&amp;gt;smb3&amp;lt;/protocol-version&amp;gt;
        &amp;lt;session-id&amp;gt;5162532547850141697&amp;lt;/session-id&amp;gt;
        &amp;lt;shares&amp;gt;1&amp;lt;/shares&amp;gt;
        &amp;lt;smb-encryption-status&amp;gt;unencrypted&amp;lt;/smb-encryption-status&amp;gt;
        &amp;lt;unix-user&amp;gt;admin&amp;lt;/unix-user&amp;gt;
        &amp;lt;user-type&amp;gt;domain_user&amp;lt;/user-type&amp;gt;
        &amp;lt;vserver&amp;gt;DEMO&amp;lt;/vserver&amp;gt;
        &amp;lt;win-unix-creds&amp;gt;-&amp;lt;/win-unix-creds&amp;gt;
        &amp;lt;windows-user&amp;gt;NTAP\Administrator&amp;lt;/windows-user&amp;gt;
      &amp;lt;/cifs-session&amp;gt;
    &amp;lt;/attributes-list&amp;gt;
    &amp;lt;num-records&amp;gt;1&amp;lt;/num-records&amp;gt;
  &amp;lt;/results&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Jun 2021 16:34:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167857#M38459</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-16T16:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167858#M38460</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/11621"&gt;@parisi&lt;/a&gt;&amp;nbsp; I understand that I can use those queries for getting the volume UUID and also the shares separately. In my original query I wanted to get the mapping between the volumes and the CIFS shares. And since CIFS share XML only returns the volume name, I wasn't feeling too sure of using the volume name as the key to map the CIFS share to the corresponding volume.&lt;BR /&gt;&lt;BR /&gt;Especially in setups where I have multiple clusters working together. Can I rely on the volume name of CIFS collected from ZAPI using cifs-share-get-iter to then map to the Volumes collected via volume-get-iter ?&lt;BR /&gt;&lt;BR /&gt;In other words can name alone be the "primary key" per-se when I have used these two queries and want to find the mapping between these objects?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:33:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167858#M38460</guid>
      <dc:creator>Madhurish</dc:creator>
      <dc:date>2021-06-16T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get volume mapped CIFS shares with ONTAPI</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167860#M38461</link>
      <description>&lt;P&gt;If you have multiple clusters with volumes that have the same name, there's not really a way to uniquify those names unless you include information such as the cluster/SVM names in the queries. cifs-shares-get-iter will only show you the output you'd see from the CLI command "cifs shares show" - you'd have to incorporate some scripting to filter things properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "cifs-session-get-iter" provides recent session info and client IP/volume relationship, but it sounds like you're going to have to use several data sources to do what you want to do here.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:46:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-volume-mapped-CIFS-shares-with-ONTAPI/m-p/167860#M38461</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-16T17:46:25Z</dc:date>
    </item>
  </channel>
</rss>

