<?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: Seeing constraints issues with metricSelector in API in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Resolve-constraint-issues-with-metricSelector-in-API/m-p/263778#M1899</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67700"&gt;@ajithsaranya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly ensure the specified parameters in the Api call meets the defined parameters in Dynatrace doc to avoid exposure to the highlighted error:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/metric-selector" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/metric-selector&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/best-practices" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/best-practices&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/examples" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/examples&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hoping it adds value&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 09:33:57 GMT</pubDate>
    <dc:creator>Peter_Youssef</dc:creator>
    <dc:date>2024-11-27T09:33:57Z</dc:date>
    <item>
      <title>Resolve constraint issues with metricSelector in API</title>
      <link>https://community.dynatrace.com/t5/Automations/Resolve-constraint-issues-with-metricSelector-in-API/m-p/263404#M1888</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;We are trying to automate metrics for our workloads and see below exception with 400 code&lt;/P&gt;
&lt;P&gt;Exception in thread "main" java.io.IOException:&lt;/P&gt;
&lt;P&gt;Error Code: 400&lt;/P&gt;
&lt;P&gt;URL: &lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;&amp;gt;/query?from=2024-11-21T17:30:01.000&amp;amp;to=2024-11-21T20:01:59.000&amp;amp;metricSelector=builtin:containers.cpu.usagePercent:filter(and(in("dt.entity.container_group_instance",entitySelector("type(container_group_instance),entityName(~"********-~")")))):splitBy("dt.entity.container_group_instance"):avg:auto:sort(value(avg,descending)):limit(10) &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Response Text: {"error":{"code":400,"message":"Constraints violated.","constraintViolations":[{"path":"nextPageKey","message":"expected one of nextPageKey or metricSelector to be specified","parameterLocation":"QUERY","location":null}]}}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;&amp;gt; is host, ** is our workload, masking it for data privacy.&lt;/P&gt;
&lt;P&gt;metricSelector is mentioned in URL yet seeing same errorcode, adding pageKey as suggested shows combination is not supported. Stuck here please help&lt;/P&gt;
&lt;P&gt;Please note that the same call works using postman&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 11:40:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Resolve-constraint-issues-with-metricSelector-in-API/m-p/263404#M1888</guid>
      <dc:creator>ajithsaranya</dc:creator>
      <dc:date>2025-12-15T11:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Seeing constraints issues with metricSelector in API</title>
      <link>https://community.dynatrace.com/t5/Automations/Resolve-constraint-issues-with-metricSelector-in-API/m-p/263778#M1899</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67700"&gt;@ajithsaranya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly ensure the specified parameters in the Api call meets the defined parameters in Dynatrace doc to avoid exposure to the highlighted error:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/metric-selector" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/metric-selector&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/best-practices" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/best-practices&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/examples" target="_blank"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/metric-v2/examples&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hoping it adds value&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 09:33:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Resolve-constraint-issues-with-metricSelector-in-API/m-p/263778#M1899</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-11-27T09:33:57Z</dc:date>
    </item>
  </channel>
</rss>

