<?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 Retrieve All Metric Dimensions in Grail Using DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/285175#M2538</link>
    <description>&lt;P&gt;Basically, I'm looking for something synonymous to the "describe" command, but for metrics.&amp;nbsp;&lt;STRONG&gt; Does anything like that currently exist?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, in DQL you get the auto-complete pop-ups when you type "by:" in the "timeseries" command and using the Metrics browser you can use the split-by to get a list of available dimensions, but I'm working on something more dynamic and need to find a way to get a list of all available dimensions for any specific metric.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is there any programmatic way to do this right now?&lt;/STRONG&gt;&amp;nbsp; In the Classic API v2 there is an endpoint that will return this data, but how would I do that in DQL or using the newer Grail API's (I'd prefer to be able to do it solely in DQL, but if that isn't possible, I could settle with an API call if necessary).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 17 Dec 2025 13:14:38 GMT</pubDate>
    <dc:creator>36Krazyfists</dc:creator>
    <dc:date>2025-12-17T13:14:38Z</dc:date>
    <item>
      <title>Retrieve All Metric Dimensions in Grail Using DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/285175#M2538</link>
      <description>&lt;P&gt;Basically, I'm looking for something synonymous to the "describe" command, but for metrics.&amp;nbsp;&lt;STRONG&gt; Does anything like that currently exist?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, in DQL you get the auto-complete pop-ups when you type "by:" in the "timeseries" command and using the Metrics browser you can use the split-by to get a list of available dimensions, but I'm working on something more dynamic and need to find a way to get a list of all available dimensions for any specific metric.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is there any programmatic way to do this right now?&lt;/STRONG&gt;&amp;nbsp; In the Classic API v2 there is an endpoint that will return this data, but how would I do that in DQL or using the newer Grail API's (I'd prefer to be able to do it solely in DQL, but if that isn't possible, I could settle with an API call if necessary).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 13:14:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/285175#M2538</guid>
      <dc:creator>36Krazyfists</dc:creator>
      <dc:date>2025-12-17T13:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of all dimensions for a metric in Grail?</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/285756#M2582</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;DQL does not currently support retrieving dimensions for a metric directly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;You could use the Metrics API on a code tile&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;You can use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://www.dynatrace.com/support/help/shortlink/api-metrics-v2" target="_blank" rel="noopener noreferrer"&gt;Metrics API v2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to query metadata for a specific metric, including its available dimensions.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Endpoint:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;GET /api/v2/metrics/{metricKey}&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Replace&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;{metricKey}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with the key of the metric you want to query (e.g.,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;builtin:host.cpu.load15m).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;The response will include details about the metric, including its dimensions (&lt;SPAN&gt;dimensionDefinitions&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;Check this &lt;A href="https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-get-descriptor#openapi-response-body-objects-openapienv2" target="_blank" rel="noopener"&gt;link&lt;/A&gt; to see the properties you would get from this API call :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 11 Sep 2025 03:15:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/285756#M2582</guid>
      <dc:creator>Emm4nuel</dc:creator>
      <dc:date>2025-09-11T03:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of all dimensions for a metric in Grail?</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/289546#M2758</link>
      <description>&lt;P&gt;To expand on this, you can actually see the available dimensions, but it's a bit inconvenient and not really a list of dimensions but a list of series. Lets assume your looking for the dimensions on the &lt;STRONG&gt;dt.host.cpu.usage&lt;/STRONG&gt; metric in Grail. If you run the following DQL query you will get all series for that metric&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch metric.series
| filter metric.key == "dt.host.cpu.usage"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;As I said, this isn't a list of dimensions, but each row represents a different series and the columns are the dimensions on that series. As the dimensions are dynamic and DQL doesn't support an unpivot command, the only real way to use this to get a list of dimensions would be to get the full list of series, export to csv, and then extract just the header row to get the dimension list. I'm currently looking for more information on how dimensions are added to metrics myself, for example with host centric metrics, the host custom metadata seems to be added as dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can pull the auto complete suggestions programmatically via the DQL autocomplete endpoint (/platform/storage/query/v1/query:autocomplete) but I have never done so and don't know how effective it is. It is the underlying logic used by the metric browser I believe.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:57:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-All-Metric-Dimensions-in-Grail-Using-DQL/m-p/289546#M2758</guid>
      <dc:creator>Isaac</dc:creator>
      <dc:date>2025-11-13T14:57:42Z</dc:date>
    </item>
  </channel>
</rss>

