Layer7 API Management

  • 1.  How to retrieve any element value from a JSON or xml input request?

    Posted Sep 20, 2016 05:13 PM

    How to retrieve any element value from a JSON or xml input request?



  • 2.  Re: How to retrieve any element value from a JSON or xml input request?

    Broadcom Employee
    Posted Sep 20, 2016 05:44 PM

    We have an assertion called json path expression that you can use to parse data from a json body:

     

     

     

    The expression is “ .Startingpoint “ to get the value of Vancouver.

     

     

     

     

     

     

     

    Derek Orr

    ca technologies

    Principal Consultant, CA API Management Presales

    m: 778-980-0029

    Email = Derek.Orr@ca.com<mailto:Derek.Orr@ca.com>

     

    CA API Management Community: https://communities.ca.com/community/ca-api-management-community



  • 3.  Re: How to retrieve any element value from a JSON or xml input request?

    Broadcom Employee
    Posted Sep 20, 2016 06:15 PM

    To add to Derek's post there are assertions called Evaluate XPath Request assertion for inbound request messages, and Evaluate XPath Response assertion which can be used to target either message context variables or response messages. These assertions can use XPath statements to pull out XML element values. The default variable set is ${requestXpath.result} for the request assertion and ${responseXpath.result} for the response assertion. The prefix can be changed in the assertion.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support