18 Jan 2021 08:54 PM - last edited on 13 Apr 2021 01:25 PM by MaciejNeumann
Hi all.
I need to create a Dynatrace Synthetic monitor to perform two requests, a POST and then a GET.
Inside the POST "requestBody" I need to pass an INT value, maybe using the api.randomNextInt().
Then the GET request need to use the same INT value generated to validate the response, to pass if present, into validation - rules - value field.
Is this possible? To use the variables into the POST requestbody, and on GET validation?
Can someone help me to set up this script properly?
Thanks.
Solved! Go to Solution.
21 Jan 2021 08:43 AM
Here you have some info about passing variables. When you set one on request 1, you should be able to use it in request 2:
https://www.dynatrace.com/support/help/shortlink/http-monitor-pre-post-script#passing-variables
Sebastian