Good evening,
Apologies if this has come up before but I have been searching forums and online and have drawn a blank on this one...!
I need to pass the current date (in iso utc format ie. YYYY-MM-DD) in a GET query in an API poller. The query looks something like this:
www.example.com/.../general
Essentially this will return all entries (items) for 'today'.
I've tested this works using postman using a pre-request variable (this works well):
---------------------
var moment = require('moment');
pm.environment.set('currentdate', moment().format(("YYYY-MM-DD")));
---------------------
But I am not sure how to do this using the Solarwinds API poller? I was thinking maybe I could use an initial GET request to the same API and use the date returned in the header as the date variable, but I would need to somehow convert or reformat this, as the date is returned in a different format (eg. Mon, 23 Sep 2024 21:04:56 GMT). Or maybe there is a public API I can use to return the date in the desired format, store that as a variable and then use that in the next GET request in the same API poller?
Anyway, I hope the above makes sense and apologies if I'm missing something obvious here. Any help and advice very much appreciated :-D
Cheers