<?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 Getting All snapmirror relationships slowly from ONTAP  API in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/161977#M170</link>
    <description>&lt;P&gt;Hello, I am trying to&amp;nbsp;use&amp;nbsp;python script to get "all snapmirrror relationships" from ONTAP API, when I run the script that it's took very long time to finished(around 30-50 minutes ), but using "snapmirror show" via ssh that it's very quickly to finished job(around 3-5 seconds ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone else has same problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;SSH cmd example:&lt;/P&gt;&lt;P&gt;ssh admin@10.255.1.10 "snapmirror show"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;python script code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/usr/bin/python [2/148]&lt;BR /&gt;import requests&lt;BR /&gt;import json&lt;BR /&gt;import urllib3&lt;BR /&gt;urllib3.disable_warnings()&lt;/P&gt;&lt;P&gt;auth_user = "admin"&lt;BR /&gt;auth_pass = "12345678"&lt;BR /&gt;api_url="&lt;A href="https://10.255.1.10/api/snapmirror/relationships/" target="_blank" rel="noopener"&gt;https://10.255.1.10/api/snapmirror/relationships/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}&lt;/P&gt;&lt;P&gt;r = requests.get(api_url, auth=(auth_user,auth_pass), headers=headers, verify=False)&lt;/P&gt;&lt;P&gt;rs = r.json()&lt;/P&gt;&lt;P&gt;total = rs["records"]&lt;/P&gt;&lt;P&gt;for r in rs["records"]:&lt;BR /&gt;#print api_url + r["uuid"]&lt;BR /&gt;api_url_list = api_url + r["uuid"]&lt;BR /&gt;print api_url_list&lt;BR /&gt;r1 = requests.get(api_url_list, auth=(auth_user,auth_pass), headers=headers, verify=False)&lt;BR /&gt;rs1 = r1.json()&lt;BR /&gt;#print rs1&lt;BR /&gt;print rs1["source"]["path"]&lt;BR /&gt;print rs1["destination"]["path"]&lt;BR /&gt;print rs1["healthy"]&lt;BR /&gt;print "===================================="&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:42:14 GMT</pubDate>
    <dc:creator>Louis_Chang</dc:creator>
    <dc:date>2025-06-04T10:42:14Z</dc:date>
    <item>
      <title>Getting All snapmirror relationships slowly from ONTAP  API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/161977#M170</link>
      <description>&lt;P&gt;Hello, I am trying to&amp;nbsp;use&amp;nbsp;python script to get "all snapmirrror relationships" from ONTAP API, when I run the script that it's took very long time to finished(around 30-50 minutes ), but using "snapmirror show" via ssh that it's very quickly to finished job(around 3-5 seconds ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone else has same problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;SSH cmd example:&lt;/P&gt;&lt;P&gt;ssh admin@10.255.1.10 "snapmirror show"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;python script code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/usr/bin/python [2/148]&lt;BR /&gt;import requests&lt;BR /&gt;import json&lt;BR /&gt;import urllib3&lt;BR /&gt;urllib3.disable_warnings()&lt;/P&gt;&lt;P&gt;auth_user = "admin"&lt;BR /&gt;auth_pass = "12345678"&lt;BR /&gt;api_url="&lt;A href="https://10.255.1.10/api/snapmirror/relationships/" target="_blank" rel="noopener"&gt;https://10.255.1.10/api/snapmirror/relationships/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}&lt;/P&gt;&lt;P&gt;r = requests.get(api_url, auth=(auth_user,auth_pass), headers=headers, verify=False)&lt;/P&gt;&lt;P&gt;rs = r.json()&lt;/P&gt;&lt;P&gt;total = rs["records"]&lt;/P&gt;&lt;P&gt;for r in rs["records"]:&lt;BR /&gt;#print api_url + r["uuid"]&lt;BR /&gt;api_url_list = api_url + r["uuid"]&lt;BR /&gt;print api_url_list&lt;BR /&gt;r1 = requests.get(api_url_list, auth=(auth_user,auth_pass), headers=headers, verify=False)&lt;BR /&gt;rs1 = r1.json()&lt;BR /&gt;#print rs1&lt;BR /&gt;print rs1["source"]["path"]&lt;BR /&gt;print rs1["destination"]["path"]&lt;BR /&gt;print rs1["healthy"]&lt;BR /&gt;print "===================================="&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:42:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/161977#M170</guid>
      <dc:creator>Louis_Chang</dc:creator>
      <dc:date>2025-06-04T10:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting All snapmirror relationships slowly from ONTAP  API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162001#M171</link>
      <description>&lt;P&gt;What ONTAP version you are on? I would open a support request as that doesn't seem right...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 18:19:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162001#M171</guid>
      <dc:creator>GidonMarcus</dc:creator>
      <dc:date>2020-12-10T18:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting All snapmirror relationships slowly from ONTAP  API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162034#M172</link>
      <description>&lt;P&gt;My ONTAP OS is 9.7P9.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 03:53:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162034#M172</guid>
      <dc:creator>Louis_Chang</dc:creator>
      <dc:date>2020-12-11T03:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting All snapmirror relationships slowly from ONTAP  API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162035#M173</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;SPAN&gt;My ONTAP OS is 9.7P9.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 03:54:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Getting-All-snapmirror-relationships-slowly-from-ONTAP-API/m-p/162035#M173</guid>
      <dc:creator>Louis_Chang</dc:creator>
      <dc:date>2020-12-11T03:54:08Z</dc:date>
    </item>
  </channel>
</rss>

