<?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: How to access Dynatrace platform API from a synthetic browser test in Synthetic Monitoring</title>
    <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304539#M3452</link>
    <description>&lt;P&gt;I got it now, you need to start the Browser to navigate till the 2FA page, to get the OTP screen...&lt;/P&gt;&lt;P&gt;How are you retrieving the OTP code, since not thru API? What are the steps you need to execute to retrieve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2026 14:00:53 GMT</pubDate>
    <dc:creator>dannemca</dc:creator>
    <dc:date>2026-09-18T14:00:53Z</dc:date>
    <item>
      <title>How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/301939#M3428</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We're trying to build asynthetic browser test against a site that requires OTP.&lt;BR /&gt;As there is no direct API to get the OTP data from the provider we need to bypass it so we've created a "back door" workflow to extract it and generate a business event that will store the result. we now in the stage that we need to query it using DQL from the script but facing CORS error as the Dynatrace domain is different than the tested site.&lt;BR /&gt;&lt;BR /&gt;we already know the great &lt;A href="https://community.dynatrace.com/t5/Troubleshooting/How-to-get-a-OTP-from-an-API-and-use-it-in-a-Browser-Monitor/ta-p/239746" target="_blank" rel="noopener"&gt;article&lt;/A&gt; from&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/1433"&gt;@HannahM&lt;/a&gt;&amp;nbsp;however the current issue is how to avoid the CORS error when accessing the platform without signing in to the platform itself (as accessing the domain itself directly goes to the login page).&lt;BR /&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;BR /&gt;Gil.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2026 06:28:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/301939#M3428</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-07-16T06:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302010#M3431</link>
      <description>&lt;P&gt;Does it matter that you only go to the login page? You could ignore the 401 error, if that's causing a failure, or is it that the login page is another domain so doesn't help?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2026 11:57:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302010#M3431</guid>
      <dc:creator>HannahM</dc:creator>
      <dc:date>2026-07-16T11:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302239#M3432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/1433"&gt;@HannahM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seemed like it was not enough but found out there was another issue. we're testing it right now. will update.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Gil.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2026 10:53:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302239#M3432</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-07-22T10:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302300#M3433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/1433"&gt;@HannahM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So I have the following browser test js node:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;api.startAsyncSyntheticEvent();

const url = 'https://TENANTURL.apps.dynatrace.com/platform/storage/query/v1/query:execute';
const payload = {
    "query": "fetch logs, from:now()-10m",
    "requestTimeoutMilliseconds": 10000
};

fetch(url, {
        method: 'POST',
        headers: {
            'accept': 'application/json',
            'Content-Type': 'application/json',
            'Authorization': 'Bearer TOKEN'
        },
        body: JSON.stringify(payload)
    })
    .then(response =&amp;gt; {
        if (!response.ok) {
            throw new Error(`HTTP ${response.status}`);
        }
        return response.json();
    })
    .then(data =&amp;gt; {
        if (data.state &amp;amp;&amp;amp; data.state !== 'SUCCEEDED') {
            api.fail("Query not complete inline, state: " + data.state);
            return;
        }
        api.info("GIL: records = " + (data.result ? data.result.records.length : 0));
        api.finish();
    })
    .catch(error =&amp;gt; {
        api.fail("GIL: fetch failed: " + error.message);
    });&lt;/LI-CODE&gt;&lt;P&gt;It runs after I navigate to my tenant url and being redirected to the sso page.&lt;BR /&gt;The fetch itself fails at the end and the message is plain "fetch failed". we've even changed the original website to another one. any thoughts? (I think this discussion is important to many use cases hence this is not directly also managed in a ticket - let me know if only a summary should be done here)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2026 09:11:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302300#M3433</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-07-23T09:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302330#M3434</link>
      <description>&lt;P&gt;if I understood correctly, you have a Workflow that retrieve the OTP and stores as business events. And now, you are using the synthetic step to query this value to use it as authentication... right?&lt;/P&gt;&lt;P&gt;Why not store the OTP in a credential vault instead, that can be used natively by synthetics?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2026 18:30:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302330#M3434</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-07-23T18:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302400#M3435</link>
      <description>&lt;P&gt;I&amp;nbsp; should have thought of it myself!! thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/18264"&gt;@dannemca&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2026 05:55:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302400#M3435</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-07-26T05:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302502#M3436</link>
      <description>&lt;P&gt;That's what community is for!!!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2026 13:17:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/302502#M3436</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-07-28T13:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304478#M3448</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/18264"&gt;@dannemca&lt;/a&gt;&amp;nbsp;had to remove teh solution as it seems that the credentials vault is loaded when the test is initiated and is not being refreshed/online accessed for the latest data. This means that updating the vault in the background will only be effective for the next run.&lt;BR /&gt;&lt;BR /&gt;We're back at square one of how to pass the OTP value to the test. API calls to the grail events (using the apps host) are getting the CORS errors. we're looking into classic API's which are currently working but this is not a long term solution.&lt;BR /&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/1433"&gt;@HannahM&lt;/a&gt;&amp;nbsp;any ideas as well?&lt;BR /&gt;&lt;BR /&gt;Gil.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 10:47:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304478#M3448</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-09-17T10:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304483#M3449</link>
      <description>&lt;P&gt;&lt;SPAN&gt;While it may seem like a roundabout path , I suugest a w&lt;/SPAN&gt;orkflow&lt;BR /&gt;- get the credential&lt;BR /&gt;- update the vault&lt;BR /&gt;-&amp;nbsp; On&amp;nbsp;demand monitor executions API to run the synthetic test.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 11:50:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304483#M3449</guid>
      <dc:creator>PacoPorro</dc:creator>
      <dc:date>2026-09-17T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304484#M3450</link>
      <description>&lt;P&gt;Yep, let the workflow orchestrate the execution.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 12:07:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304484#M3450</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-09-17T12:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304485#M3451</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40713"&gt;@PacoPorro&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The thing is that the synthetic test that needs to test the whole screen is now in the middle of its run. starting a new one will generate a new OTP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 12:08:14 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304485#M3451</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2026-09-17T12:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Dynatrace platform API from a synthetic browser test</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304539#M3452</link>
      <description>&lt;P&gt;I got it now, you need to start the Browser to navigate till the 2FA page, to get the OTP screen...&lt;/P&gt;&lt;P&gt;How are you retrieving the OTP code, since not thru API? What are the steps you need to execute to retrieve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2026 14:00:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/How-to-access-Dynatrace-platform-API-from-a-synthetic-browser/m-p/304539#M3452</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-09-18T14:00:53Z</dc:date>
    </item>
  </channel>
</rss>

