<?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: Host disk usage API call in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232776#M2841</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you change visualization to "Single value":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_0-1703419966595.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16449iF56418FCE040CB78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_0-1703419966595.png" alt="AntonPineiro_0-1703419966595.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Notice "&lt;EM&gt;&amp;amp;resolution=Inf&lt;/EM&gt;" is added in the end when you copy request from wizard. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X GET "https://{environment_id}.live.dynatrace.com/api/v2/metrics/query?metricSelector=(builtin:host.disk.usedPct:filter(and(or(in(\"dt.entity.host\",entitySelector(\"type(host),entityName.equals(~\"XXXX~\")\"))))):splitBy():sort(value(auto,descending))):names&amp;amp;from=-2h&amp;amp;to=now&amp;amp;resolution=Inf"  -H "accept: application/json"  -H "Authorization: Api-Token XXXX-XXXX"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Sun, 24 Dec 2023 12:17:05 GMT</pubDate>
    <dc:creator>AntonPineiro</dc:creator>
    <dc:date>2023-12-24T12:17:05Z</dc:date>
    <item>
      <title>Host disk usage API call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232600#M2837</link>
      <description>&lt;P&gt;Hi, I am trying to use an API request to get a server disk usage percentage. How can I achieve this?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:59:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232600#M2837</guid>
      <dc:creator>Itani_ML</dc:creator>
      <dc:date>2023-12-21T14:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Host disk usage API call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232604#M2838</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can go to data explorer and select metric you and instered (builtin:host.disk.usedPct in this case) and filter server by name.&lt;/P&gt;&lt;P&gt;After that, press "..." and select "Copy Request":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_0-1703173734623.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16375i3158765FA55612ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_0-1703173734623.png" alt="AntonPineiro_0-1703173734623.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And you have an example to get that data.&lt;/P&gt;&lt;P&gt;You need to generate a token with correct permissions in advance.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 15:49:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232604#M2838</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2023-12-21T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Host disk usage API call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232631#M2839</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/70129"&gt;@Itani_ML&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I also recommend using API Explorer, which will allow you to easily prepare and check a query to retrieve the metric of your choice.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/section-api#api-explorer" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/section-api#api-explorer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can find the metrics where the &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/58682"&gt;@AntonPineiro&lt;/a&gt;&amp;nbsp;pointed out.&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 21:50:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232631#M2839</guid>
      <dc:creator>radek_jasinski</dc:creator>
      <dc:date>2023-12-21T21:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Host disk usage API call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232763#M2840</link>
      <description>&lt;P&gt;Thanks you, it really worked. One last question, with this request, is it possible to only filter out the value?&lt;/P&gt;&lt;P&gt;Below is my request and I am running it from Bamboo, I only want to get the value of the disk as the output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -X GET "&lt;A href="https://{environmentid}.live.dynatrace.com/api/v2/metrics/query?metricSelector=(builtin:host.disk.free:filter(and(or(in(\" target="_blank"&gt;https://{environmentid}.live.dynatrace.com/api/v2/metrics/query?metricSelector=(builtin:host.disk.free:filter(and(or(in(\&lt;/A&gt;"dt.entity.host\",entitySelector(\"type(~\"HOST~\"),entityName.equals(~\"dhdelasticls01.discsrv.co.za~\")\"))))):splitBy():sort(value(auto,descending))):limit(100):names&amp;amp;from=-2h&amp;amp;to=now" -H "accept: application/json" -H "Authorization: Api-Token XXXX-XXXX"&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 13:27:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232763#M2840</guid>
      <dc:creator>Itani_ML</dc:creator>
      <dc:date>2023-12-23T13:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Host disk usage API call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232776#M2841</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you change visualization to "Single value":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_0-1703419966595.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16449iF56418FCE040CB78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_0-1703419966595.png" alt="AntonPineiro_0-1703419966595.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Notice "&lt;EM&gt;&amp;amp;resolution=Inf&lt;/EM&gt;" is added in the end when you copy request from wizard. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X GET "https://{environment_id}.live.dynatrace.com/api/v2/metrics/query?metricSelector=(builtin:host.disk.usedPct:filter(and(or(in(\"dt.entity.host\",entitySelector(\"type(host),entityName.equals(~\"XXXX~\")\"))))):splitBy():sort(value(auto,descending))):names&amp;amp;from=-2h&amp;amp;to=now&amp;amp;resolution=Inf"  -H "accept: application/json"  -H "Authorization: Api-Token XXXX-XXXX"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 12:17:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Host-disk-usage-API-call/m-p/232776#M2841</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2023-12-24T12:17:05Z</dc:date>
    </item>
  </channel>
</rss>

