<?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 Syntax to Filter result from DFM API with resource-filter in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Syntax-to-Filter-result-from-DFM-API-with-resource-filter/m-p/134641#M2477</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that beginner question, but I really can't find the info&lt;/P&gt;&lt;P&gt;I'm trying to filter a request sent to OCUM.&lt;/P&gt;&lt;P&gt;The example is about cluster-iter, but i have the same problem with all other API when resource-filter is used&lt;/P&gt;&lt;P&gt;I cannot figure out the syntax to use with&amp;nbsp;resource-filter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By example, without any resource-filter when i query OCUM about cluster-iter, i get all cluster registered into OCUM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# curl --insecure -d '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt; &amp;lt;cluster-iter&amp;gt; &amp;lt;max-records&amp;gt;10&amp;lt;/max-records&amp;gt; &amp;lt;/cluster-iter&amp;gt; &amp;lt;/netapp&amp;gt;' https://admin:password@&amp;lt;ocumIP&amp;gt;/apis/XMLrequest
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;!DOCTYPE netapp SYSTEM 'http://127.0.0.1:9999/netapp_server.dtd'&amp;gt;&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt;&lt;BR /&gt;&amp;lt;results status="passed"&amp;gt;&lt;BR /&gt;&amp;lt;num-records&amp;gt;6&amp;lt;/num-records&amp;gt;&lt;BR /&gt;&amp;lt;records&amp;gt;&lt;BR /&gt;    &amp;lt;cluster-info&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-address&amp;gt;10.65.180.106&amp;lt;/cluster-address&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-diagnosis-status&amp;gt;degraded&amp;lt;/cluster-diagnosis-status&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-name&amp;gt;ClusterA&amp;lt;/cluster-name&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-status&amp;gt;Error&amp;lt;/cluster-status&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-version&amp;gt;9.2&amp;lt;/cluster-version&amp;gt;&lt;BR /&gt;       &amp;lt;datasource-id&amp;gt;2&amp;lt;/datasource-id&amp;gt;&lt;BR /&gt;       &amp;lt;last-update-time&amp;gt;1505926372&amp;lt;/last-update-time&amp;gt;&lt;BR /&gt;       &amp;lt;licenses&amp;gt;&amp;lt;license&amp;gt;&lt;BR /&gt;       &amp;lt;description&amp;gt;SnapVault License&amp;lt;/description&amp;gt;&lt;BR /&gt;       &amp;lt;owner-name&amp;gt;ClusterA&amp;lt;/owner-name&amp;gt;....&lt;/PRE&gt;&lt;P&gt;If i want to filter result and only get information&amp;nbsp;for one particular cluster, i need to use resource-filter.&lt;/P&gt;&lt;P&gt;But i don't find the correct syntax and always get the same error:&lt;/P&gt;&lt;PRE&gt;# curl --insecure -d '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt; &amp;lt;cluster-iter&amp;gt; &amp;lt;max-records&amp;gt;10&amp;lt;/max-records&amp;gt; &amp;lt;resource-filter&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;ClusterA&amp;lt;/ul&amp;gt;&amp;lt;/resource-filter&amp;gt; &amp;lt;/cluster-iter&amp;gt; &amp;lt;/netapp&amp;gt;' https://admin:netapp@10.65.180.6/apis/XMLrequest
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;!DOCTYPE netapp SYSTEM 'http://127.0.0.1:9999/netapp_server.dtd'&amp;gt;&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt;&lt;BR /&gt;&amp;lt;results status="failed" reason="ParseError at [row,col]:[1,168] Message: Expected EndElement {http://www.netapp.com/filer/admin}resource-filter" errno="13001"/&amp;gt;&amp;lt;/netapp&amp;gt;&lt;/PRE&gt;&lt;P&gt;ZEXPLORER indicate the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;lt;!--Resource by which to filter the result set. Any resource-filters specified in the first call must be included in subsequent calls. The allowed object types for this argument are: &amp;lt;ul&amp;gt; &amp;lt;li&amp;gt; cluster &amp;lt;/ul&amp;gt; If resource-filter identifies a cluster, that single cluster will be returned. If resource-filter resolves to more than one cluster, all of them will be returned. If no resource-filter is provided, all clusters will be listed.--&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know the resource-filter syntax to filter resource from DFM API result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 14:34:42 GMT</pubDate>
    <dc:creator>masson</dc:creator>
    <dc:date>2025-06-04T14:34:42Z</dc:date>
    <item>
      <title>Syntax to Filter result from DFM API with resource-filter</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Syntax-to-Filter-result-from-DFM-API-with-resource-filter/m-p/134641#M2477</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that beginner question, but I really can't find the info&lt;/P&gt;&lt;P&gt;I'm trying to filter a request sent to OCUM.&lt;/P&gt;&lt;P&gt;The example is about cluster-iter, but i have the same problem with all other API when resource-filter is used&lt;/P&gt;&lt;P&gt;I cannot figure out the syntax to use with&amp;nbsp;resource-filter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By example, without any resource-filter when i query OCUM about cluster-iter, i get all cluster registered into OCUM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# curl --insecure -d '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt; &amp;lt;cluster-iter&amp;gt; &amp;lt;max-records&amp;gt;10&amp;lt;/max-records&amp;gt; &amp;lt;/cluster-iter&amp;gt; &amp;lt;/netapp&amp;gt;' https://admin:password@&amp;lt;ocumIP&amp;gt;/apis/XMLrequest
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;!DOCTYPE netapp SYSTEM 'http://127.0.0.1:9999/netapp_server.dtd'&amp;gt;&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt;&lt;BR /&gt;&amp;lt;results status="passed"&amp;gt;&lt;BR /&gt;&amp;lt;num-records&amp;gt;6&amp;lt;/num-records&amp;gt;&lt;BR /&gt;&amp;lt;records&amp;gt;&lt;BR /&gt;    &amp;lt;cluster-info&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-address&amp;gt;10.65.180.106&amp;lt;/cluster-address&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-diagnosis-status&amp;gt;degraded&amp;lt;/cluster-diagnosis-status&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-name&amp;gt;ClusterA&amp;lt;/cluster-name&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-status&amp;gt;Error&amp;lt;/cluster-status&amp;gt;&lt;BR /&gt;       &amp;lt;cluster-version&amp;gt;9.2&amp;lt;/cluster-version&amp;gt;&lt;BR /&gt;       &amp;lt;datasource-id&amp;gt;2&amp;lt;/datasource-id&amp;gt;&lt;BR /&gt;       &amp;lt;last-update-time&amp;gt;1505926372&amp;lt;/last-update-time&amp;gt;&lt;BR /&gt;       &amp;lt;licenses&amp;gt;&amp;lt;license&amp;gt;&lt;BR /&gt;       &amp;lt;description&amp;gt;SnapVault License&amp;lt;/description&amp;gt;&lt;BR /&gt;       &amp;lt;owner-name&amp;gt;ClusterA&amp;lt;/owner-name&amp;gt;....&lt;/PRE&gt;&lt;P&gt;If i want to filter result and only get information&amp;nbsp;for one particular cluster, i need to use resource-filter.&lt;/P&gt;&lt;P&gt;But i don't find the correct syntax and always get the same error:&lt;/P&gt;&lt;PRE&gt;# curl --insecure -d '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt; &amp;lt;cluster-iter&amp;gt; &amp;lt;max-records&amp;gt;10&amp;lt;/max-records&amp;gt; &amp;lt;resource-filter&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;ClusterA&amp;lt;/ul&amp;gt;&amp;lt;/resource-filter&amp;gt; &amp;lt;/cluster-iter&amp;gt; &amp;lt;/netapp&amp;gt;' https://admin:netapp@10.65.180.6/apis/XMLrequest
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;!DOCTYPE netapp SYSTEM 'http://127.0.0.1:9999/netapp_server.dtd'&amp;gt;&amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.0"&amp;gt;&lt;BR /&gt;&amp;lt;results status="failed" reason="ParseError at [row,col]:[1,168] Message: Expected EndElement {http://www.netapp.com/filer/admin}resource-filter" errno="13001"/&amp;gt;&amp;lt;/netapp&amp;gt;&lt;/PRE&gt;&lt;P&gt;ZEXPLORER indicate the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;lt;!--Resource by which to filter the result set. Any resource-filters specified in the first call must be included in subsequent calls. The allowed object types for this argument are: &amp;lt;ul&amp;gt; &amp;lt;li&amp;gt; cluster &amp;lt;/ul&amp;gt; If resource-filter identifies a cluster, that single cluster will be returned. If resource-filter resolves to more than one cluster, all of them will be returned. If no resource-filter is provided, all clusters will be listed.--&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know the resource-filter syntax to filter resource from DFM API result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:34:42 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Syntax-to-Filter-result-from-DFM-API-with-resource-filter/m-p/134641#M2477</guid>
      <dc:creator>masson</dc:creator>
      <dc:date>2025-06-04T14:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Filter result from DFM API with resource-filter</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Syntax-to-Filter-result-from-DFM-API-with-resource-filter/m-p/135814#M2500</link>
      <description>&lt;P&gt;I ran into the same problem and tried it this way with no success:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;cluster-node-iter&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;resource-filter&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cluster&amp;gt;my_cluster&amp;lt;/cluster&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/resource-filter&amp;gt;&lt;BR /&gt;&amp;lt;/cluster-node-iter&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It results in this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:\n&amp;lt;results status="failed" reason="ParseError at [row,col]:[1,301] Message: Expected EndElement {&lt;A href="http://www.netapp.com/filer/admin}resource-filter" target="_blank"&gt;http://www.netapp.com/filer/admin}resource-filter&lt;/A&gt;" errno="13001"&amp;gt;&amp;lt;/results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints to get it working?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 07:19:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Syntax-to-Filter-result-from-DFM-API-with-resource-filter/m-p/135814#M2500</guid>
      <dc:creator>arminwiesel_fts</dc:creator>
      <dc:date>2017-11-07T07:19:24Z</dc:date>
    </item>
  </channel>
</rss>

