<?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: Api call for oneagent using tags in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256512#M33863</link>
    <description>&lt;P&gt;or this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;curl -X 'GET' \ 'https:/URL/e/ENV_ID/api/v2/entities?entitySelector=type%28%22HOST%22%29%2Ctag%28%22AppID%3A104378%22%29' \ -H 'accept: application/json; charset=utf-8' \ -H 'Authorization: Api-Token TOKEN'&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 18:16:06 GMT</pubDate>
    <dc:creator>GilesDay</dc:creator>
    <dc:date>2024-09-19T18:16:06Z</dc:date>
    <item>
      <title>API call for OneAgent using tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256510#M33861</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can someone give me the api call to get the hosts associated with App ID, below is the output .. can someone get me the appropriate api call&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"entityId": "HOST-xxx",&lt;BR /&gt;"displayName": "Ahghj.ally.corp",&lt;BR /&gt;"tags": [&lt;BR /&gt;{&lt;BR /&gt;"context": "CONTEXTLESS",&lt;BR /&gt;"key": "AppID",&lt;BR /&gt;"value": "104378"&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 11:30:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256510#M33861</guid>
      <dc:creator>huzoor</dc:creator>
      <dc:date>2024-09-24T11:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Api call for oneagent using tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256511#M33862</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/dynatrace-oss/api-client-python" target="_blank"&gt;GitHub - dynatrace-oss/api-client-python: Dynatrace API Python client&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from dynatrace import Dynatrace
from dynatrace import TOO_MANY_REQUESTS_WAIT
from dynatrace.environment_v2.tokens_api import SCOPE_METRICS_READ, SCOPE_METRICS_INGEST
from dynatrace.configuration_v1.credential_vault import PublicCertificateCredentials
from dynatrace.environment_v2.settings import SettingsObject, SettingsObjectCreate

from datetime import datetime, timedelta

# Create a Dynatrace client
dt = Dynatrace("environment_url", "api_token")

# Get all hosts and some properties
for entity in dt.entities.list('type("HOST"),tag("AppID:104378")'):
    print(entity.entity_id, entity.display_name, entity.properties)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:11:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256511#M33862</guid>
      <dc:creator>GilesDay</dc:creator>
      <dc:date>2024-09-19T18:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Api call for oneagent using tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256512#M33863</link>
      <description>&lt;P&gt;or this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;curl -X 'GET' \ 'https:/URL/e/ENV_ID/api/v2/entities?entitySelector=type%28%22HOST%22%29%2Ctag%28%22AppID%3A104378%22%29' \ -H 'accept: application/json; charset=utf-8' \ -H 'Authorization: Api-Token TOKEN'&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:16:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256512#M33863</guid>
      <dc:creator>GilesDay</dc:creator>
      <dc:date>2024-09-19T18:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Api call for oneagent using tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256513#M33864</link>
      <description>&lt;P&gt;thank you so much&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:26:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/256513#M33864</guid>
      <dc:creator>huzoor</dc:creator>
      <dc:date>2024-09-19T18:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: API call for OneAgent using tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/257107#M33925</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/79417"&gt;@huzoor&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;you can create access token with "oneAgents.read", "DataExport" scopes either or both would be fine.&lt;/LI&gt;&lt;LI&gt;If you have access to environment Api v1 &amp;gt; oneagent on a host &amp;gt; Get.&lt;/LI&gt;&lt;LI&gt;unlock the key &amp;gt; try it now &amp;gt; execute.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peter_Youssef_0-1727273129351.png" style="width: 752px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22883iF68FA4DD6A14EA91/image-dimensions/752x457?v=v2" width="752" height="457" role="button" title="Peter_Youssef_0-1727273129351.png" alt="Peter_Youssef_0-1727273129351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 14:06:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/API-call-for-OneAgent-using-tags/m-p/257107#M33925</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-09-25T14:06:55Z</dc:date>
    </item>
  </channel>
</rss>

