<?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 Help making an API call with entitySelector in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183630#M1792</link>
    <description>&lt;P&gt;Hi Dynatrace,&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Can you please provide some guidance how to use entitySelector to retrieve host data by host name?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I tried different options but none successful. Here is one example:&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;.../api/v2/&lt;/SPAN&gt;&lt;SPAN&gt;entities?entitySelector=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;type('host'),tag('Hostname:xxxxxx')&lt;BR /&gt;&lt;SPAN&gt;Note: I can retrieve the host info by entityId using&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;entities/{entityId} but that means I need to retrieve and/or maintain a separate map of hostnames to entityIds.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Also, do you have more info about how to interpret API error messages?&lt;BR /&gt;Ex: what should I understand from this output?&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 400,&lt;BR /&gt;"message": "Constraints violated.",&lt;BR /&gt;"constraintViolations": [&lt;BR /&gt;{&lt;BR /&gt;"path": "entitySelector",&lt;BR /&gt;"message": "The requested type is not exportable",&lt;BR /&gt;"parameterLocation": "QUERY",&lt;BR /&gt;"location": null&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 31 Mar 2022 08:04:02 GMT</pubDate>
    <dc:creator>adtuser</dc:creator>
    <dc:date>2022-03-31T08:04:02Z</dc:date>
    <item>
      <title>Help making an API call with entitySelector</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183630#M1792</link>
      <description>&lt;P&gt;Hi Dynatrace,&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Can you please provide some guidance how to use entitySelector to retrieve host data by host name?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I tried different options but none successful. Here is one example:&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;.../api/v2/&lt;/SPAN&gt;&lt;SPAN&gt;entities?entitySelector=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;type('host'),tag('Hostname:xxxxxx')&lt;BR /&gt;&lt;SPAN&gt;Note: I can retrieve the host info by entityId using&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;entities/{entityId} but that means I need to retrieve and/or maintain a separate map of hostnames to entityIds.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Also, do you have more info about how to interpret API error messages?&lt;BR /&gt;Ex: what should I understand from this output?&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 400,&lt;BR /&gt;"message": "Constraints violated.",&lt;BR /&gt;"constraintViolations": [&lt;BR /&gt;{&lt;BR /&gt;"path": "entitySelector",&lt;BR /&gt;"message": "The requested type is not exportable",&lt;BR /&gt;"parameterLocation": "QUERY",&lt;BR /&gt;"location": null&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Mar 2022 08:04:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183630#M1792</guid>
      <dc:creator>adtuser</dc:creator>
      <dc:date>2022-03-31T08:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help making an API call with entitySelector</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183632#M1793</link>
      <description>&lt;P&gt;The problem is the single quote you are using on the filter.&lt;BR /&gt;try with double quotes.&amp;nbsp;&lt;SPAN&gt;entitySelector=&lt;/SPAN&gt;type("host"),tag("your:tag")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 13:48:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183632#M1793</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2022-03-30T13:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help making an API call with entitySelector</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183640#M1794</link>
      <description>&lt;P&gt;Thank you! That was it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:23:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Help-making-an-API-call-with-entitySelector/m-p/183640#M1794</guid>
      <dc:creator>adtuser</dc:creator>
      <dc:date>2022-03-30T14:23:55Z</dc:date>
    </item>
  </channel>
</rss>

