<?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: Python API quotareport script for user quota in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-API-quotareport-script-for-user-quota/m-p/166306#M3133</link>
    <description>&lt;P&gt;There were multiple reasons I faced this issue one was VPN connection from home , when you dont have proper ssh connection to the controller from your desktop/jumpserver to your end controller it throws this issue ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sometimes when you do a .get command it cant find the values if quota report has empty variables try using getattr to set values of unset variables to zero or null&lt;/P&gt;&lt;P&gt;try get collection command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quots = quotareport.get_collection(vol.uuid)&lt;/P&gt;&lt;P&gt;for quotx&amp;nbsp; in quots :&lt;BR /&gt;quotx.get(fields='&lt;SPAN class="ident"&gt;specifier&lt;/SPAN&gt;,volume,&lt;SPAN class="ident"&gt;space&lt;/SPAN&gt;,qtree,&lt;SPAN class="ident"&gt;files&lt;/SPAN&gt;,index,&lt;SPAN class="ident"&gt;qtree&lt;/SPAN&gt; ')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Apr 2021 21:16:15 GMT</pubDate>
    <dc:creator>a4ashu</dc:creator>
    <dc:date>2021-04-26T21:16:15Z</dc:date>
    <item>
      <title>Python API quotareport script for user quota</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-API-quotareport-script-for-user-quota/m-p/164654#M3125</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to APi's, Wrote the below one,&amp;nbsp;&lt;BR /&gt;My requirement is to get the quota report for a user. Couls someone kindly help me with the error below.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;cat quota.py&lt;/P&gt;&lt;P&gt;#!/usr/bin/python3&lt;BR /&gt;from netapp_ontap import HostConnection&lt;BR /&gt;from netapp_ontap import NetAppRestError&lt;BR /&gt;from netapp_ontap.resources import QuotaReport&lt;/P&gt;&lt;P&gt;with HostConnection("xxxxxxxx", username="admin", password="XXXXXX", verify=False):&lt;BR /&gt;resource = QuotaReport(&lt;BR /&gt;index=2305843013508661248,&lt;BR /&gt;**{"volume.uuid": "de90a323-1349-49c9-acdf-f6822e82f6db"}&lt;BR /&gt;)&lt;BR /&gt;resource.get()&lt;BR /&gt;print(resource)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i run this in python script, i am getting below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ ./quota.py&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "./quota.py", line 11, in &amp;lt;module&amp;gt;&lt;BR /&gt;resource.get()&lt;BR /&gt;File "/usr/local/lib/python3.6/site-packages/netapp_ontap/resources/quota_report.py", line 1339, in get&lt;BR /&gt;return super()._get(**kwargs)&lt;BR /&gt;File "/usr/local/lib/python3.6/site-packages/netapp_ontap/utils.py", line 55, in wrapper&lt;BR /&gt;return on_api_fail(erro)&lt;BR /&gt;File "/usr/local/lib/python3.6/site-packages/netapp_ontap/utils.py", line 78, in on_api_fail&lt;BR /&gt;raise NetAppRestError(cause=erro) from None&lt;BR /&gt;netapp_ontap.error.NetAppRestError: Caused by HTTPError('404 Client Error: Not Found for url: &lt;A href="https://10.109.24.221:443/api/storage/quota/reports/2305843013508661248" target="_blank" rel="noopener"&gt;https://10.109.24.221:443/api/storage/quota/reports/2305843013508661248&lt;/A&gt;',): "2305843013508661248" is an invalid value for field "volume.uuid" (&amp;lt;UUID&amp;gt;)&lt;BR /&gt;$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:32:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-API-quotareport-script-for-user-quota/m-p/164654#M3125</guid>
      <dc:creator>Gundapaneni</dc:creator>
      <dc:date>2025-06-04T10:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python API quotareport script for user quota</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-API-quotareport-script-for-user-quota/m-p/166306#M3133</link>
      <description>&lt;P&gt;There were multiple reasons I faced this issue one was VPN connection from home , when you dont have proper ssh connection to the controller from your desktop/jumpserver to your end controller it throws this issue ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sometimes when you do a .get command it cant find the values if quota report has empty variables try using getattr to set values of unset variables to zero or null&lt;/P&gt;&lt;P&gt;try get collection command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quots = quotareport.get_collection(vol.uuid)&lt;/P&gt;&lt;P&gt;for quotx&amp;nbsp; in quots :&lt;BR /&gt;quotx.get(fields='&lt;SPAN class="ident"&gt;specifier&lt;/SPAN&gt;,volume,&lt;SPAN class="ident"&gt;space&lt;/SPAN&gt;,qtree,&lt;SPAN class="ident"&gt;files&lt;/SPAN&gt;,index,&lt;SPAN class="ident"&gt;qtree&lt;/SPAN&gt; ')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 21:16:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-API-quotareport-script-for-user-quota/m-p/166306#M3133</guid>
      <dc:creator>a4ashu</dc:creator>
      <dc:date>2021-04-26T21:16:15Z</dc:date>
    </item>
  </channel>
</rss>

