<?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: Dynatrace api v2, how to access host's schemaId (builtin:anomaly-detection.infrastructure-disk) using setting/object REST  API in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270207#M3613</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here are the results of my REST explorations&lt;/P&gt;&lt;P&gt;Evironment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;tenants:&lt;UL&gt;&lt;LI&gt;18&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;total Hosts:&lt;UL&gt;&lt;LI&gt;45k&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;SchemaId to check:&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;builtin:anomaly-detection.infrastructure-disks.per-disk-override&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;required to check that it's not been disabled accidentally&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cynematics:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get hosts (18 multipage request)&lt;/LI&gt;&lt;LI&gt;for each host:&lt;UL&gt;&lt;LI&gt;get /api/v2/entities/HOST-XXXXXXXXXXXXXXXX&lt;/LI&gt;&lt;LI&gt;from each host get: (tens of disks per hosts)&lt;UL&gt;&lt;LI&gt;"toRelationships": {&lt;BR /&gt;"isDiskOf": [&lt;BR /&gt;{&lt;BR /&gt;"id": "DISK-XXXXXXXXXXXXXXXX",&lt;BR /&gt;"type": "DISK"&lt;BR /&gt;},&amp;nbsp;&lt;BR /&gt;...&lt;BR /&gt;]&lt;BR /&gt;}&lt;/LI&gt;&lt;LI&gt;for each disk:&lt;UL&gt;&lt;LI&gt;get&amp;nbsp;/api/v2/settings/objects?schemaIds=builtin%3Aanomaly-detection.infrastructure-disks.per-disk-override&amp;amp;scopes=DISK-XXXXXXXXXXXXXXXX&amp;amp;fields=objectId%2Cvalue&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Estimated number of REST request on the schemaId: 45000 times ( average of 10 disks per hosts configured) is 450k&lt;/LI&gt;&lt;LI&gt;About 20 hours to get the informations at 10 millisec per request.&lt;UL&gt;&lt;LI&gt;Tools used:&lt;UL&gt;&lt;LI&gt;python 3.11&lt;/LI&gt;&lt;LI&gt;asyncio&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This should be available at the HOST level just like the UI is offering, as it's not practical to use the UI to check 45k hosts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2025 09:58:12 GMT</pubDate>
    <dc:creator>hyperdev</dc:creator>
    <dc:date>2025-02-17T09:58:12Z</dc:date>
    <item>
      <title>Dynatrace api v2, how to access host's schemaId (builtin:anomaly-detection.infrastructure-disk) using setting/object REST  API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270039#M3611</link>
      <description>&lt;P&gt;The information is accessible thru the UI and not thru the API&lt;/P&gt;
&lt;P&gt;https://&amp;lt;tenant&amp;gt;/.../&lt;U&gt;&lt;STRONG&gt;ui&lt;/STRONG&gt;&lt;/U&gt;/settings/HOST-xxxxxxxxxxxxxxxx/builtin:anomaly-detection.infrastructure-disks?gtf=-2h&amp;amp;gf=all&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 08:13:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270039#M3611</guid>
      <dc:creator>hyperdev</dc:creator>
      <dc:date>2025-02-17T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace api v2, how to access host's schemaId (builtin:anomaly-detection.infrastructure-disk) using setting/object REST  API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270056#M3612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Easier way would be, going to schema in the UI:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_0-1739471292296.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26408iB0240AC0BAD8AE35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_0-1739471292296.png" alt="AntonPineiro_0-1739471292296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select "..." -&amp;gt; API:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_1-1739471368253.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26409i150538E0AB130B7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_1-1739471368253.png" alt="AntonPineiro_1-1739471368253.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see there, it is not HOST-id, you need object ID. If you go to full API specification:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntonPineiro_2-1739471459409.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26410iBE2BD07C490367E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntonPineiro_2-1739471459409.png" alt="AntonPineiro_2-1739471459409.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would call all objects you are interested using filters (filtering by schema for example), get objects IDs, and make a second call to get details of ID (disk).&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 18:33:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270056#M3612</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2025-02-13T18:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace api v2, how to access host's schemaId (builtin:anomaly-detection.infrastructure-disk) using setting/object REST  API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270207#M3613</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here are the results of my REST explorations&lt;/P&gt;&lt;P&gt;Evironment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;tenants:&lt;UL&gt;&lt;LI&gt;18&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;total Hosts:&lt;UL&gt;&lt;LI&gt;45k&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;SchemaId to check:&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;builtin:anomaly-detection.infrastructure-disks.per-disk-override&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;required to check that it's not been disabled accidentally&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cynematics:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get hosts (18 multipage request)&lt;/LI&gt;&lt;LI&gt;for each host:&lt;UL&gt;&lt;LI&gt;get /api/v2/entities/HOST-XXXXXXXXXXXXXXXX&lt;/LI&gt;&lt;LI&gt;from each host get: (tens of disks per hosts)&lt;UL&gt;&lt;LI&gt;"toRelationships": {&lt;BR /&gt;"isDiskOf": [&lt;BR /&gt;{&lt;BR /&gt;"id": "DISK-XXXXXXXXXXXXXXXX",&lt;BR /&gt;"type": "DISK"&lt;BR /&gt;},&amp;nbsp;&lt;BR /&gt;...&lt;BR /&gt;]&lt;BR /&gt;}&lt;/LI&gt;&lt;LI&gt;for each disk:&lt;UL&gt;&lt;LI&gt;get&amp;nbsp;/api/v2/settings/objects?schemaIds=builtin%3Aanomaly-detection.infrastructure-disks.per-disk-override&amp;amp;scopes=DISK-XXXXXXXXXXXXXXXX&amp;amp;fields=objectId%2Cvalue&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Estimated number of REST request on the schemaId: 45000 times ( average of 10 disks per hosts configured) is 450k&lt;/LI&gt;&lt;LI&gt;About 20 hours to get the informations at 10 millisec per request.&lt;UL&gt;&lt;LI&gt;Tools used:&lt;UL&gt;&lt;LI&gt;python 3.11&lt;/LI&gt;&lt;LI&gt;asyncio&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This should be available at the HOST level just like the UI is offering, as it's not practical to use the UI to check 45k hosts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 09:58:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Dynatrace-api-v2-how-to-access-host-s-schemaId-builtin-anomaly/m-p/270207#M3613</guid>
      <dc:creator>hyperdev</dc:creator>
      <dc:date>2025-02-17T09:58:12Z</dc:date>
    </item>
  </channel>
</rss>

