Go to All Forums

Jsonpath assertion

I have an api simply responses a json

{"is_reset": true/false}

For the synthetic monitor step's content check section JSONPath expression field can I just use $.is_reset for the assertion? Will it mark the monitor down when the response is false?

Like (2) Reply
Replies (1)

Re: Jsonpath assertion


In JSON Validation, we will verify only the JSON Path, we will not do assert check. 

However, to validate this case you can configure the response format as Text and configure "{\"is_reset\": false}" in Should not contain string option and toggle the option to Down for Down Alert. 

Should Not Contain Check

This will send you a DOWN Alert if the string {"is_reset":false} is present in the response.

Else you can configure "{\"is_reset\": true}" in Should contain string section. 

This configuration will send if the pattern {"is_reset": true} is not present in the response.

 Let us know if this works for you.

Site24x7 Team.

Like (0) Reply

Was this post helpful?