<?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 API call runs fine in Dynatrace Harness, but not in Python - It's the &amp;amp;to and &amp;amp;from qualifiers in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226796#M2726</link>
    <description>&lt;P&gt;I execute these parameters in both the Dynatrace API harness and in Python.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;metricSelector=builtin%3Akubernetes.container.restarts%3Afilter%28and%28or%28in%28%22dt.entity.cloud_application_namespace%22%2CentitySelector%28%22type%28cloud_application_namespace%29%2CentityName.equals%28~%22XXX-XXXXX-1~%22%29%22%29%29%29%2Cor%28in%28%22dt.entity.cloud_application_instance%22%2CentitySelector%28%22type%28cloud_application_instance%29%2CentityName.contains%28~%22FOO~%22%29%22%29%29%29%29%29%3Alimit%2820%29&lt;FONT color="#FF0000"&gt;&amp;amp;from=2023-10-25T00%3A00%3A00.000%2B04%3A00&amp;amp;to=2023-10-25T00%3A01%3A00.000%2B04%3A00&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;My issue is that it runs fine in the Dynatrace API harness, but NOT in Python, the &amp;amp;to and &amp;amp;from exclude all the data.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;I have constructed hundreds of queries, and this is just weird!!!&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;Any advice would be appreciated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;Lou&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 15:09:53 GMT</pubDate>
    <dc:creator>crabbylou</dc:creator>
    <dc:date>2023-12-20T15:09:53Z</dc:date>
    <item>
      <title>API call runs fine in Dynatrace Harness, but not in Python - It's the &amp;to and &amp;from qualifiers</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226796#M2726</link>
      <description>&lt;P&gt;I execute these parameters in both the Dynatrace API harness and in Python.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;metricSelector=builtin%3Akubernetes.container.restarts%3Afilter%28and%28or%28in%28%22dt.entity.cloud_application_namespace%22%2CentitySelector%28%22type%28cloud_application_namespace%29%2CentityName.equals%28~%22XXX-XXXXX-1~%22%29%22%29%29%29%2Cor%28in%28%22dt.entity.cloud_application_instance%22%2CentitySelector%28%22type%28cloud_application_instance%29%2CentityName.contains%28~%22FOO~%22%29%22%29%29%29%29%29%3Alimit%2820%29&lt;FONT color="#FF0000"&gt;&amp;amp;from=2023-10-25T00%3A00%3A00.000%2B04%3A00&amp;amp;to=2023-10-25T00%3A01%3A00.000%2B04%3A00&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;My issue is that it runs fine in the Dynatrace API harness, but NOT in Python, the &amp;amp;to and &amp;amp;from exclude all the data.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;I have constructed hundreds of queries, and this is just weird!!!&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;Any advice would be appreciated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;Lou&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:09:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226796#M2726</guid>
      <dc:creator>crabbylou</dc:creator>
      <dc:date>2023-12-20T15:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Augh!!! - API call runs fine in Dynatrace Harness, but not in Python - It's the &amp;to and &amp;from qualifiers</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226876#M2730</link>
      <description>&lt;P&gt;I'm not familiar with Harness or any processing it may do on inputs.&lt;/P&gt;
&lt;P&gt;You can try constructing it through the &lt;A href="https://docs.dynatrace.com/docs/shortlink/section-api#api-explorer" target="_self"&gt;API Explorer&lt;/A&gt; first and make sure the structure is right independent of Python or other tools. You may want to share your Python snippet as well.&lt;/P&gt;
&lt;P&gt;Lastly, if you're interested I recommend looking at our open-source &lt;A href="https://github.com/dynatrace-oss/api-client-python" target="_self"&gt;Python API client&lt;/A&gt; which includes methods for querying data from the metrics API so you just need to provide the inputs instead of creating the queries yourself.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 14:21:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226876#M2730</guid>
      <dc:creator>JamesKitson</dc:creator>
      <dc:date>2023-10-27T14:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Augh!!! - API call runs fine in Dynatrace Harness, but not in Python - It's the &amp;to and &amp;from qualifiers</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226889#M2731</link>
      <description>&lt;P&gt;I figured it out. It was a dumb programming error on my part. I was reading my date fields in Python as integers, and the lead zeroes on day, month, hour, minute and second were reading as integers and truncating lead zeroes.&lt;/P&gt;&lt;P&gt;Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 18:05:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/API-call-runs-fine-in-Dynatrace-Harness-but-not-in-Python-It-s/m-p/226889#M2731</guid>
      <dc:creator>crabbylou</dc:creator>
      <dc:date>2023-10-27T18:05:23Z</dc:date>
    </item>
  </channel>
</rss>

