Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to do a POST event in Synthetic Browser monitoring?

DynaMight Guru
DynaMight Guru

I'm trying to do a simple synthetic browser monitoring script, that does a POST request with some data. I have been struggling for more than an hour to find how to do such basic functionality, but seems it's better to seek some help here... Any clue?

Antonio Sousa

DynaMight Legend
DynaMight Legend

@Antonio S. i was just able to create a synthetic monitor click path that goes to the Dynatrace Config API and creates a managment zone, and then deletes it. Where are you running into a snag?


It must be because it's late Friday night here 😉

I have looked at the available browser clickpath events,

but there seems to be no way of making a POST, namely with the "navigate" event.

It does seem to be possible to do it with the HTTP monitors, but not
with the browser monitors, which was the one I referenced...

Antonio Sousa

@Chad T.,

Can you confirm please what type of synthetic monitor you used? Just to be sure it was not the browser clickpath?

Antonio Sousa

I did use the click path to do the post - I did not run into any issues with that - I dont think you can do it via the basic browser monitor as how would you input the Json payload.


Dynatrace Leader
Dynatrace Leader

How are you doing this? I've seen it work in Browser Clickpaths using fetch.

The first event has to be a Navigate in Clickpaths though, so you can only do this as a later event.

Not sure what "fetch" you are referring to?

Yes, the Navigate is the first. After that I have the following options:

Navigate seems the only option that could support a POST, but it is very limited in what we can do:

Antonio Sousa

Why are you adding it manually? its much easier if you add the chrome extension, then record your click path via the new browser window and access your www.<ApiEndPoint>.com and post the json payload.


Yes, I normally use the Chrome extension, but in this specific case, it can't be done 😞

Now I understand how you did it 🙂

BTW, this is not a POST to an API. It is a specific POST in a login situation...

I'll probably have to go the Javascript route...

Antonio Sousa

ahh okay, id be interested if you can still be able to get it working via the click path set up - keep us in the loop how it goes.! you can always also create the Synthetic via in a Json then pass it into Dynatrace and have it create it.


Apologies, I should have mentioned that it's a 'fetch' in JavaScript event that is required to do this.

Dynatrace Leader
Dynatrace Leader

You'll want something like this:

fetch('<yourRequest>', {
method: 'POST',
headers: {
'content-type': 'application/json'},
body: '<yourBody>'
}).then(response => response.text()).then(text => {
try {'Success');
} else {"Invalid Response");
} catch (err) {"Failed to Execute");
} });

Thanks Hannah,

I'm finally done, but didn't use the POST after all, because there were Javascript tricks, so I had to reverse engineer the HTML/Javascript code, and in the ending it was quite easier than I would have thought.

What seems could be a limitation around the few options available in Dynatrace, is easily worked around with Javascript 🙂

Antonio Sousa

Great Team Work!


Hi Antonio,

Can you post the solution?

Featured Posts