Synthetic check for change in the API output

My requirement is

for one of the API i am getting output as

{
“syncToken”: “1738496063”,
“createDate”: “2025-02-02-11-34-23”,
“prefixes”: [
{
“region”: “ap-northeast-1”,
“provider”: “aws”,
“ip_prefix”: [
“100.100.100.100/23”
]
},
{
“region”: “ap-northeast-2”,
“provider”: “aws”,
“ip_prefix”: [
“200.200.200.200/23”
]
}
]
}

can i create a synthetic script and throw an alert if there are any change to this output?

is this possible?

If you want to detect only change (e.g. not validate a particular IP address) in synthetic, then you have at least two options:

  • Have the last value stored in a credential vault, and validate it in your tests (use the script execution for that) - I recommend this approach.
  • Have update the test using API