I have this request and I want to use pick current date every time instead of hardcoding this value, I tried using api.setValue(“currentDate”, api.dateToFormat(api.date(), “dd/MM/yy”)); but its giving syntax error.
Please let me know how can I achive this, basically in from and to in below URL I want it to pick current date everytime.
You can “go crazy” using pre/post-execution script. You can do some math and calculate the previous date based on current date. It may requires some scripting skills, but doable.
Also, do check if the API you are calling does allow you to transform the date interval, like Dynatrace API does, example, “from=-24h to now”, means all previous 24h.