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?

Reply 1
Replies (5)

Re: JSONPath expression failing

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

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

Thanks!

Reply 0

Re: Re: JSONPath expression failing

Hi,

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

 

Could 24x7 take a look in this issue?

Thanks


Re: JSONPath expression failing

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

 

Reply 0

Re: Re: JSONPath expression failing

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.

Reply 0

Re: JSONPath expression failing

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