Go to All Forums

JSONPath expression failing

I have a REST API Monitor configured for a very simple API endpoint in my system, but the monitor is reporting that my JSONPath expression is failing. The endpoint returns the following with Content-Type: application/json:

{"codeVersion":"1.0.0","apiVersion":"1.0.0"}

The monitor is configured for JSON response format and I've tried several different JSONPATH values:

  1. $.apiVersion -- for this I got "JSON Path expression assertion "["$.apiVersion"]" has failed"
  2. apiVersion -- for this I got "JSON Path expression assertion "["apiVersion"]" has failed"
  3. [apiVersion] -- for this I got JSON Path expression assertion "["[apiVersion]"]" has failed

What am I doing wrong? Is there any documentation for supported JSONPath expressions?

Like (2) Reply
Replies (6)

I'm having issues with the JsonPath expressions as well!

Any chance we can see some documentation around the expected syntax please?

Thanks!

Like (0) Reply

Hi,

Same problems here! Don't know why it failed because it's correct syntax.

 

Could 24x7 take a look in this issue?

Thanks

Like (0) Reply

From Site24x7 support:
 
We had an issue in our end which caused the JSONPATH expression to fail. The issue has been fixed from our end and it is yet to be Live with the product.
 
I will let update you when the fix is available Live with the product.
 
Please write to us if you require any further clarifications, we would be glad to assist you further  
 
Regards,
Nithin Das.H
Site24x7 Team | ZOHO Corp

 

Like (0) Reply

Hello mpartridge,

    A fix for this issue is scheduled to go out shortly. We'll keep you updated on the same.

    For the JSON response you posted above, the expression $.apiVersion would be correct, once the fix is live.

Like (0) Reply

From my support request:

I would like to keep you informed that the issue on JSONPATH validation has been fixed from our end and it is now Live with the product. Please check and let us know the status.
Regards,
Nithin Das.H
Site24x7 Team | ZOHO Corp
Like (0) Reply

We had a small number of false positives over a weekend, but it was taken care of:

Hello Mike,
Our apologies for any inconvenience caused.
After analysis, we found that one of our location server was not properly updated with the fix. We have now fixed this issue as well. I request you to check and let us know if the issue persists.
Looking forward to hear from you.
Regards,
Nithin Das.H
Site24x7 Team | ZOHO Corp

After turning the monitor back on with $.apiVersion, we've had no false positives for the past 7 days.

Like (0) Reply

Was this post helpful?