<?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: Metrics Query API in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Metrics-Query-API/m-p/186870#M1898</link>
    <description>&lt;P&gt;I'll refer to the answer just posted &lt;A href="https://community.dynatrace.com/t5/REST-API/Dynatrace-API-to-get-Availability-metrics-report-and-RUM-details/m-p/186862/highlight/true#M1897" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API Explorer lets you set the values for the timeframes and includes some tips:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesKitson_0-1652970231542.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/5758i0F8E28E1969E3FE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesKitson_0-1652970231542.png" alt="JamesKitson_0-1652970231542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For 1 year you can enter &lt;STRONG&gt;now-1y&amp;nbsp;&lt;/STRONG&gt;in the from parameter. And the URL it sends and sample command displayed are updated accordingly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X GET "https://&amp;lt;dynatrace_hostname&amp;gt;/api/v2/metrics/query?metricSelector=builtin%3Asynthetic.browser.availability.location.total%3AsplitBy%28%22dt.entity.synthetic_test%22%2C%22dt.entity.geolocation%22%29&amp;amp;from=now-1y" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token &amp;lt;api_token&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 14:26:02 GMT</pubDate>
    <dc:creator>JamesKitson</dc:creator>
    <dc:date>2022-05-19T14:26:02Z</dc:date>
    <item>
      <title>Metrics Query API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Metrics-Query-API/m-p/186710#M1894</link>
      <description>&lt;P&gt;Hi Team, I want to get the synthetic monitoring availability for all configured monitors for a month or year. I got to know that we can get it with metrics Query API. but am not sure about the timeframe and resolution i should pass while querying. Could you please provide the appropriate curl command to get these details?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:47:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Metrics-Query-API/m-p/186710#M1894</guid>
      <dc:creator>Balamurugesh</dc:creator>
      <dc:date>2022-05-19T12:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics Query API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Metrics-Query-API/m-p/186870#M1898</link>
      <description>&lt;P&gt;I'll refer to the answer just posted &lt;A href="https://community.dynatrace.com/t5/REST-API/Dynatrace-API-to-get-Availability-metrics-report-and-RUM-details/m-p/186862/highlight/true#M1897" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API Explorer lets you set the values for the timeframes and includes some tips:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesKitson_0-1652970231542.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/5758i0F8E28E1969E3FE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesKitson_0-1652970231542.png" alt="JamesKitson_0-1652970231542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For 1 year you can enter &lt;STRONG&gt;now-1y&amp;nbsp;&lt;/STRONG&gt;in the from parameter. And the URL it sends and sample command displayed are updated accordingly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X GET "https://&amp;lt;dynatrace_hostname&amp;gt;/api/v2/metrics/query?metricSelector=builtin%3Asynthetic.browser.availability.location.total%3AsplitBy%28%22dt.entity.synthetic_test%22%2C%22dt.entity.geolocation%22%29&amp;amp;from=now-1y" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token &amp;lt;api_token&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 14:26:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Metrics-Query-API/m-p/186870#M1898</guid>
      <dc:creator>JamesKitson</dc:creator>
      <dc:date>2022-05-19T14:26:02Z</dc:date>
    </item>
  </channel>
</rss>

