<?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 How to query multiple entityTypes in a single API call? in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-query-multiple-entityTypes-in-a-single-API-call/m-p/221697#M2631</link>
    <description>&lt;P&gt;How can I query for multiple entityTypes in a single call?&lt;/P&gt;
&lt;P&gt;e.g. I want to query for all the entities which are either type (HOST) or type(PROCESS_GROUP_INSTANCE) for an environment?&lt;/P&gt;
&lt;P&gt;GET /e/&amp;lt;env-id&amp;gt;/api/v2/entities?pageSIze=500&amp;amp;entitySelector=tag("TAGABCD"),type(HOST)&amp;amp;fields=firstSeenTms,lastSeenTms,properties,tags,managementZones,fromRelationships,toRelationships&lt;/P&gt;
&lt;P&gt;in the above query, I can only entities of type HOST? can I query for multiple entity types e.g. give me the list of all the entities with are either "HOST" or "PROCESS_GROUP_INSTANCE"?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2024 13:56:37 GMT</pubDate>
    <dc:creator>NavenduGupta</dc:creator>
    <dc:date>2024-08-20T13:56:37Z</dc:date>
    <item>
      <title>How to query multiple entityTypes in a single API call?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-query-multiple-entityTypes-in-a-single-API-call/m-p/221697#M2631</link>
      <description>&lt;P&gt;How can I query for multiple entityTypes in a single call?&lt;/P&gt;
&lt;P&gt;e.g. I want to query for all the entities which are either type (HOST) or type(PROCESS_GROUP_INSTANCE) for an environment?&lt;/P&gt;
&lt;P&gt;GET /e/&amp;lt;env-id&amp;gt;/api/v2/entities?pageSIze=500&amp;amp;entitySelector=tag("TAGABCD"),type(HOST)&amp;amp;fields=firstSeenTms,lastSeenTms,properties,tags,managementZones,fromRelationships,toRelationships&lt;/P&gt;
&lt;P&gt;in the above query, I can only entities of type HOST? can I query for multiple entity types e.g. give me the list of all the entities with are either "HOST" or "PROCESS_GROUP_INSTANCE"?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 13:56:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-query-multiple-entityTypes-in-a-single-API-call/m-p/221697#M2631</guid>
      <dc:creator>NavenduGupta</dc:creator>
      <dc:date>2024-08-20T13:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to query multiple entityTypes in a single api call?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-query-multiple-entityTypes-in-a-single-API-call/m-p/222277#M2635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are looking to e.g. find the process group instances (PGI) for a specific host you can use the relationships.&lt;/P&gt;&lt;P&gt;e.g. to get the PGIs of host(s) tagged with "CF Tag" you can use following entititySelector&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;type(process_group_instance),fromRelationships.isProcessOf(type(host),tag("CF Tag"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Or directly from a specific host using it's own ID&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;type(process_group_instance),fromRelationships.isProcessOf(type(host),entityId(HOST-EA50C80CC9354652))&lt;/LI-CODE&gt;&lt;P&gt;Atm it is not possible to query multiple entity types in one call.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 09:52:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-query-multiple-entityTypes-in-a-single-API-call/m-p/222277#M2635</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2023-09-05T09:52:31Z</dc:date>
    </item>
  </channel>
</rss>

