<?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 integration with AppEngine in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221777#M482</link>
    <description>&lt;P&gt;&lt;SPAN&gt;You have to parse the data with&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" target="_blank" rel="noopener noreferrer"&gt;JSON.parse()&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;before using&amp;nbsp;&lt;/SPAN&gt;forEach()&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2023 17:54:35 GMT</pubDate>
    <dc:creator>natanael_mendes</dc:creator>
    <dc:date>2023-08-28T17:54:35Z</dc:date>
    <item>
      <title>Dynatrace API integration with AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221776#M481</link>
      <description>&lt;P&gt;I am building an app using AppEngine.&amp;nbsp; I want to gather various metrics within Dynatrace and display the results, filtering by a teams tag for an end of year monitoring audit review.&amp;nbsp; The data we need is not available in Grail (yet).&amp;nbsp; I have several Dyantrace API's we run in Google Sheets to gather this data, but it is a tedious task to separate it out by teams.&amp;nbsp; My question is, I am having trouble leveraging the Dyantrace API using typescript in AppEngine.&amp;nbsp; &amp;nbsp;Has any had success leveraging the Dynatrace API Env 2 within an AppEngine project?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is the code I have at the moment.&amp;nbsp; It isn't throwing any errors in Visual Studio Code editor, but when I run it, I get an error on the screen:&amp;nbsp;&lt;/P&gt;&lt;P&gt;JS Error | data2.forEach is not a function&lt;/P&gt;&lt;P&gt;TypeError: data2.forEach is not a function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 17:46:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221776#M481</guid>
      <dc:creator>allie_diaz</dc:creator>
      <dc:date>2023-08-28T17:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace API integration with AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221777#M482</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You have to parse the data with&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" target="_blank" rel="noopener noreferrer"&gt;JSON.parse()&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;before using&amp;nbsp;&lt;/SPAN&gt;forEach()&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 17:54:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221777#M482</guid>
      <dc:creator>natanael_mendes</dc:creator>
      <dc:date>2023-08-28T17:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace API integration with AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221783#M483</link>
      <description>&lt;P&gt;I don't actually have forEach() anywhere in my code. I am not sure where this error message is coming from.&amp;nbsp; Maybe I should be using a forEach() somewhere.&amp;nbsp; Have you leveraged the Dynatrace APIs in AppEngine.&amp;nbsp; If so, I would love to see your code snippet.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 19:15:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221783#M483</guid>
      <dc:creator>allie_diaz</dc:creator>
      <dc:date>2023-08-28T19:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace API integration with AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221785#M484</link>
      <description>&lt;P&gt;The error message "TypeError: data.forEach is not a function" typically occurs when you try to use the forEach method on a variable that is not an array. In your code, it seems that you are trying to use forEach on the data variable within the ApiDataDisplay component, but data is being assigned the value of the apiTable variable, which is the Axios library itself rather than an array.&lt;/P&gt;&lt;P&gt;To fix this issue, you should modify your code to correctly fetch the API data and then use the fetched data to render the table. Here's how you can do that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const ApiDataDisplay = () =&amp;gt; {&lt;BR /&gt;const [apiData, setApiData] = useState([]);&lt;/P&gt;&lt;P&gt;useEffect(() =&amp;gt; {&lt;BR /&gt;async function fetchData() {&lt;BR /&gt;try {&lt;BR /&gt;const response = await apiTable.request(getApi);&lt;BR /&gt;const { data } = response;&lt;BR /&gt;setApiData(data.entities); // Assuming 'entities' is the array you want to display&lt;BR /&gt;} catch (error) {&lt;BR /&gt;console.error(error);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;fetchData();&lt;BR /&gt;}, []);&lt;/P&gt;&lt;P&gt;const columns = useMemo&amp;lt;TableColumn[]&amp;gt;(() =&amp;gt; ApiTableColumns, []);&lt;/P&gt;&lt;P&gt;return &amp;lt;DataTable columns={columns} data={apiData} /&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 20:07:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221785#M484</guid>
      <dc:creator>natanael_mendes</dc:creator>
      <dc:date>2023-08-28T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace API integration with AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221787#M486</link>
      <description>&lt;P&gt;This is exactly what I was looking for.&amp;nbsp; The App is now loading. I am getting "no data available", but it is loading.&amp;nbsp; That was a huge hurdle.&amp;nbsp; Thank you.&amp;nbsp; Now I have to figure out why no data is being returned.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 20:21:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Dynatrace-API-integration-with-AppEngine/m-p/221787#M486</guid>
      <dc:creator>allie_diaz</dc:creator>
      <dc:date>2023-08-28T20:21:00Z</dc:date>
    </item>
  </channel>
</rss>

