Layer7 API Management

Expand all | Collapse all

Evaluate JSON Path Expression Assertion

Jump to Best Answer
  • 1.  Evaluate JSON Path Expression Assertion

    Posted 04-15-2015 07:19 AM

    Hello

     

    I am working with the Evaluate JSON path Assertion and have set the input for the assertion as "Other message variable", but the assertion is not picking up the value from the variable and the policy seems to be failing.

    Can you please let me know what might be going wrong?

    I tried using the ''Test Input'' feature and it seemed to be giving the right output when i put the actual string, but the same doesnt seem to be getting picked up from the variable.



  • 2.  Re: Evaluate JSON Path Expression Assertion

    Posted 04-16-2015 07:14 AM

    Does anyone have an idea if we can use more than one expression in the Evaluate JSON Path assertion? I am trying to store the username and password in the Map assertion and then using the output variable in Evaluate JSON Path assertion to extract the values of username and password.

    Unfortunately it seems as if i can extract only one value at a time. Is there any way i can do both?



  • 3.  Re: Evaluate JSON Path Expression Assertion
    Best Answer

    Posted 04-15-2015 10:31 AM

    Is the variable you are trying to use of 'Message' type? I think that assertion requires a 'Message' as opposed to a 'String'.



  • 4.  Re: Evaluate JSON Path Expression Assertion

    Posted 04-16-2015 01:33 AM

    Thanks Doyle! I noticed that later.. Used a message variable now and i seems to be working. Appreciate the prompt reply



  • 5.  Re: Evaluate JSON Path Expression Assertion

    Broadcom Employee
    Posted 04-15-2015 01:00 PM

    The content type must also be set to "application/json"



  • 6.  Re: Evaluate JSON Path Expression Assertion

    Posted 11-22-2017 12:01 PM

    This was the issue for me.... My content type was set to text/html... Thanks for the tip!