<?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: How to set &amp;quot;hard_limit&amp;quot; using Rest API? in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158635#M106</link>
    <description>&lt;P&gt;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2020 10:58:25 GMT</pubDate>
    <dc:creator>PAVLENYCH</dc:creator>
    <dc:date>2020-08-13T10:58:25Z</dc:date>
    <item>
      <title>How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158383#M93</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to set "hard_limit" for specific user using Rest API?&lt;/P&gt;
&lt;P&gt;Actually I only need an example of get/post HTTP Request for setting/updating "hard_limit" for a user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:58:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158383#M93</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2025-06-04T10:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158386#M94</link>
      <description>&lt;P&gt;This is the example from the &lt;A href="https://library.netapp.com/ecmdocs/ECMLP2862544/html/index.html#/" target="_self"&gt;API docs&lt;/A&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;The following example shows how to update a quota policy rule.

# The API:
PATCH /storage/quota/rules/{uuid}
# The call:
curl -X PATCH "https://&amp;lt;mgmt-ip&amp;gt;/api/storage/quota/rules/364d38eb-8e87-11e8-a806-005056a7e73a" -H 'accept: application/hal+json' -d "@test_quota_patch.txt"
test_quota_patch.txt(body):
{
  "space": {
    "hard_limit": 16554,
    "soft_limit": 8192
  },
  "files": {
    "hard_limit": 40,
    "soft_limit": 20
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;Or if you are using Python with the &lt;A href="https://pypi.org/project/netapp-ontap/" target="_self"&gt;netapp-ontap library&lt;/A&gt;, the docs are &lt;A href="https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/quota_rule.html#updating-the-quota-policy-rule" target="_self"&gt;here&lt;/A&gt;:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from netapp_ontap import HostConnection
from netapp_ontap.resources import QuotaRule

with HostConnection("&amp;lt;mgmt-ip&amp;gt;", username="admin", password="password", verify=False):
    resource = QuotaRule(uuid="364d38eb-8e87-11e8-a806-005056a7e73a")
    resource.space.hard_limit = 16554
    resource.space.soft_limit = 8192
    resource.files.hard_limit = 40
    resource.files.soft_limit = 20
    resource.patch()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:21:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158386#M94</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-08-06T18:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158397#M95</link>
      <description>&lt;P&gt;Hello&amp;nbsp;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all thank you for your reply once again.&lt;/P&gt;
&lt;P&gt;Please correct me if I'm wrong, by changing rule I'm actually changing the rule, that applies not for specific user, but for multiple?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 05:52:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158397#M95</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-07T05:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158407#M96</link>
      <description>&lt;P&gt;Yes, it would apply to all of the users in that rule's list. If you needed to have different limits for different users, I think you would need to have multiple quota rules.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 10:55:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158407#M96</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-08-07T10:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158419#M97</link>
      <description>&lt;P&gt;Hello&amp;nbsp;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If each user has his own quota, is it available to change user's for example "hard_limit"?&lt;/P&gt;
&lt;P&gt;I'm asking, because in our company each user has his own quota and there is no rule, which is applied for all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 15:39:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158419#M97</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-07T15:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158420#M98</link>
      <description>&lt;P&gt;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In our case I can get user's quota by following PowerShell command:&lt;/P&gt;
&lt;P&gt;get-ncquotareport -target "someUser"&lt;/P&gt;
&lt;P&gt;Each user has different "soft_limit" and "hard_limit".&lt;/P&gt;
&lt;P&gt;Does it still mean there is different rule for each user?&lt;/P&gt;
&lt;P&gt;I'm asking, because need to change from time to time "soft_limit" and "hard_limit" for different user.&lt;/P&gt;
&lt;P&gt;In PowerShell I can do it based on user and not rule.&lt;/P&gt;
&lt;P&gt;My question whether I can do it u based on user using Rest API as I do it with PowerShell?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel p&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 16:05:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158420#M98</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-07T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158421#M99</link>
      <description>&lt;P&gt;The PowerShell command we use for setting quota for user is:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Set-NcQuota -User "domain\user" -volume "someVolume" - disklimit "someLimit".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Is there an option to perform this using Rest API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 16:36:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158421#M99</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-07T16:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158423#M100</link>
      <description>&lt;P&gt;I'll forward this thread to the quota team to see if they know better, but from what I see in the API, there is no "quota" object that you can interact with. Only quota rules which then have a list of users.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 16:51:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158423#M100</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-08-07T16:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158432#M101</link>
      <description>&lt;P&gt;Hello&amp;nbsp;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 19:01:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158432#M101</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-07T19:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158621#M102</link>
      <description>&lt;P&gt;Hello&amp;nbsp;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just wanted to ask whether some answer from Quota Team regarding using Rest API for setting Quota for specific user and not for a Rule?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 08:26:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158621#M102</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-13T08:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158631#M103</link>
      <description>&lt;P&gt;Hi Pavel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The answer seems to be no, not really. The hard_limit field is not tied to a single user, but rather to a rule. Each rule has a list of one or more users that it applies to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If in your system, you create a new QuotaRule for every user, then you can achieve what you want with a single REST call by using the collection patch technique:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -iku admin -X PATCH -d '{"files": {"hard_limit": 100}}' https://&amp;lt;mgmt_ip&amp;gt;/api/storage/quota/rules?users.name=fred&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A word of caution. This call will patch every quota rule that has the user fred listed in it. But if it's one to one, then that will do what you want. The quota team figured this was basically what the PowerShell Toolkit was doing behind the scenes since they didn't know of any API that was user based as the command would suggest.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:11:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158631#M103</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-08-13T10:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158632#M104</link>
      <description>&lt;P&gt;Dear&amp;nbsp;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really appreciate your help - it's just priceless!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is no API for setting "hard_limit" based on user and not Rule, then I will just add this PowerShell command to my C# code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RobertBlackhart, thank you so much for your time and huge help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:51:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158632#M104</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-13T10:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158634#M105</link>
      <description>&lt;P&gt;No problem. Good luck with the rest of your automation!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:57:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158634#M105</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-08-13T10:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "hard_limit" using Rest API?</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158635#M106</link>
      <description>&lt;P&gt;RobertBlackhart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:58:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/How-to-set-quot-hard-limit-quot-using-Rest-API/m-p/158635#M106</guid>
      <dc:creator>PAVLENYCH</dc:creator>
      <dc:date>2020-08-13T10:58:25Z</dc:date>
    </item>
  </channel>
</rss>

