<?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 [REST CLI API] Unable to create quota policy rule in the specified policy in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/REST-CLI-API-Unable-to-create-quota-policy-rule-in-the-specified-policy/m-p/160022#M36588</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I'm stuck on creating quota policy rules in the specified policy(not SVM default) via CLI REST API.&lt;/P&gt;
&lt;P&gt;There is a requirement in my team to create such policy rule, which can be performed on ONTAP CLI with something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;volume quota policy rule create -vserver svm12 -policy-name quota_policy_svm12 -volume vff5716a8cf824acaa5c441d515ea7287 -type tree -target nfs -disk-limit 107374182400 -file-limit 3276800&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Here it is mandatory to create a rule outside the SVM default quota policy, so using `/storage/quota/rules` does not meet our requirements.&lt;BR /&gt;I understand that using CLI API `private/cli/volume/quota/policy/rule` is the only way to get this accomplished in the new API world.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get following error when I perform this via CLI API(running on ONTAP9.7P6, P7):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "volume": "vff5716a8cf824acaa5c441d515ea7287", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "Unexpected argument \"volume\".",
"code": "262179",
"target": "volume"
}
}$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which is similar to what I experimentally include invalid parameter "foo":&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "foo": "bar", "volume": "vff5716a8cf824acaa5c441d515ea7287", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "Unexpected argument \"foo\".",
"code": "262179",
"target": "foo"
}
}$ &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I also try to remove "volume" parameter from the request, it replies like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "\"volume\" is a required field",
"code": "2",
"target": "volume"
}
}$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which is exactly the same response as what it behaves through the ONTAP command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;lb2vx-00010002n::&amp;gt; volume quota policy rule create -vserver svm12 -policy-name quota_policy_svm12 -type tree -target nfs -disk-limit 107374182400 -file-limit 3276800
Error: command failed: "volume" is a required field

lb2vx-00010002n::&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From these behaviors, I can assume that there is a bug in the validation process in the REST API server running on ONTAP,&lt;BR /&gt;and the request is rejected before it gets actually passed to the filer itself.&lt;/P&gt;
&lt;P&gt;Could you please check if this is a bug or not?&lt;BR /&gt;Please let me know if the usage here is wrong.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you very much for your kind support,&lt;/P&gt;
&lt;P&gt;Hiroshi Abe&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:50:43 GMT</pubDate>
    <dc:creator>hrs_abe</dc:creator>
    <dc:date>2025-06-04T10:50:43Z</dc:date>
    <item>
      <title>[REST CLI API] Unable to create quota policy rule in the specified policy</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/REST-CLI-API-Unable-to-create-quota-policy-rule-in-the-specified-policy/m-p/160022#M36588</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I'm stuck on creating quota policy rules in the specified policy(not SVM default) via CLI REST API.&lt;/P&gt;
&lt;P&gt;There is a requirement in my team to create such policy rule, which can be performed on ONTAP CLI with something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;volume quota policy rule create -vserver svm12 -policy-name quota_policy_svm12 -volume vff5716a8cf824acaa5c441d515ea7287 -type tree -target nfs -disk-limit 107374182400 -file-limit 3276800&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Here it is mandatory to create a rule outside the SVM default quota policy, so using `/storage/quota/rules` does not meet our requirements.&lt;BR /&gt;I understand that using CLI API `private/cli/volume/quota/policy/rule` is the only way to get this accomplished in the new API world.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get following error when I perform this via CLI API(running on ONTAP9.7P6, P7):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "volume": "vff5716a8cf824acaa5c441d515ea7287", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "Unexpected argument \"volume\".",
"code": "262179",
"target": "volume"
}
}$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which is similar to what I experimentally include invalid parameter "foo":&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "foo": "bar", "volume": "vff5716a8cf824acaa5c441d515ea7287", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "Unexpected argument \"foo\".",
"code": "262179",
"target": "foo"
}
}$ &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I also try to remove "volume" parameter from the request, it replies like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ curl -k -uadmin -XPOST -d'{"vserver": "svm12", "policy-name": "quota_policy_svm12", "disk-limit": 107374182400, "file-limit": 3276800, "type": "tree", "target": "nfs"}' https://10.161.64.220/api/private/cli/volume/quota/policy/rule
Enter host password for user 'admin':
{
"error": {
"message": "\"volume\" is a required field",
"code": "2",
"target": "volume"
}
}$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which is exactly the same response as what it behaves through the ONTAP command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;lb2vx-00010002n::&amp;gt; volume quota policy rule create -vserver svm12 -policy-name quota_policy_svm12 -type tree -target nfs -disk-limit 107374182400 -file-limit 3276800
Error: command failed: "volume" is a required field

lb2vx-00010002n::&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From these behaviors, I can assume that there is a bug in the validation process in the REST API server running on ONTAP,&lt;BR /&gt;and the request is rejected before it gets actually passed to the filer itself.&lt;/P&gt;
&lt;P&gt;Could you please check if this is a bug or not?&lt;BR /&gt;Please let me know if the usage here is wrong.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you very much for your kind support,&lt;/P&gt;
&lt;P&gt;Hiroshi Abe&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:50:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/REST-CLI-API-Unable-to-create-quota-policy-rule-in-the-specified-policy/m-p/160022#M36588</guid>
      <dc:creator>hrs_abe</dc:creator>
      <dc:date>2025-06-04T10:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: [REST CLI API] Unable to create quota policy rule in the specified policy</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/REST-CLI-API-Unable-to-create-quota-policy-rule-in-the-specified-policy/m-p/160028#M36589</link>
      <description>&lt;P&gt;It might be a bug. I tried reproing and got the same result. Please open a case.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 14:51:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/REST-CLI-API-Unable-to-create-quota-policy-rule-in-the-specified-policy/m-p/160028#M36589</guid>
      <dc:creator>paul_stejskal</dc:creator>
      <dc:date>2020-10-08T14:51:37Z</dc:date>
    </item>
  </channel>
</rss>

