I need to evaluate a Date field in a JSON response with a heartbeat monitor. it look like there is a date() option using gval, but I can't make it work.
and I need to evaluate that the date in the version field isn't older than 1 day, because then there is a problem with the sync scheduler on the Web service.
Sorry to hear you've hit a stumbling block here @mktbec .
TBH, this isn't a use case we handle that well at the moment, I don't suspect it's possible since we don't parse that string as a date.
We are looking at multi-step API journeys, as something for our mid to long term roadmap. At the moment our focus is on the synthetics service. Ultimately, I think you'll want the full power of scripting to do these checks right.
For now, the best answer with our current stack would be to do a browser based check and parse the JSON source, though that's very clunky.
Unfortunately the JSON format doesn't actually have its own notion of dates. What people usually do is encode ISO8601 dates into strings, but we don't actually handle that in a special way.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.