1. Support
  2. Knowledge base
  3. Synthetic Monitoring
  4. Monitor settings
  5. Dynamic values in URLs and POST content

Dynamic values in URLs and POST content

Dynamic value in URL or request body

Uptrends can generate dynamic date values in URLs or HTTP request content, for most monitor types. Timestamps are commonly used, because not only are they unique values, they also contain information about when the request was executed. This can be useful for web services that require a different value to be entered as part of the request body for a HTTP POST or the request URL, for example:

... <StartDate>2023-02-27</StartDate> ...

Rather than entering a fixed value date, we can use the following notation to generate values based on today’s date/time:

... <StartDate>{{@DateTime(dd-MM-yyyy)}}</StartDate> ...

Please note that other format values are also possible. Additionally, we can use offsets to calculate different values. For more information on the notation, and how to apply offsets to your date values, see our article on automatic variables.

Cache busting

Content caching can be incredibly useful for any webmaster, because it can improve overall performance by using fewer resources over time. But if you’re monitoring a website or service, caching can make it difficult to know whether one of your page elements is truly up or down.

By inserting a random URL value, you can bust the cache for any HTTP, Web Service, or Full Page Check call, and ensure that no previous content is cached.

Note: The following information is about server side caching on your side, not on the side of the Uptrends' website monitoring service.

How does cache busting work?

Cache busting is made possible by using the {{@RandomGuid}} token (see our knowledge base article on automatic variables for more information). To use this feature, simply enter the token as part of the URL in the monitor settings, for example:

http://www.example.com?myvalue={{@RandomGuid}}

Which gets resolved as something like:

http://www.example.com?myvalue=37f1f109-58a2-4bea-adfb-9aed54619453

By using the Uptrends website, you consent to the use of cookies in accordance with our Cookie Policy.