Layer7 API Management

  • 1.  json path result

    Posted Apr 30, 2018 09:20 PM

    Hi There,

    I have below json data,if the data is null i want to send some notification to user through return template response.How can i check null data condition in API gateway.pls advice.

    {

    "GUID" : "323"

    }

    specifically I want to check null ,for instance ,if the data is null or empty in the curry braces {   } do this,how can i do this in the gateway.



  • 2.  Re: json path result

    Posted May 01, 2018 12:21 PM

    Assuming it is for Virtualization. You can write a match script to check if data is null or empty, you can send the default/meta response. 

     

    Read more:  

    Transactions Tab for Stateless Transactions - DevTest Solutions - 10.0 - CA Technologies Documentation 



  • 3.  Re: json path result

    Posted May 01, 2018 01:19 PM

    I was asking in terms of CA API gateway.If it was in wrong group could you please kindly move it to the CA API gateway forum.



  • 4.  Re: json path result

    Posted May 01, 2018 01:36 PM

    Please subscribe and post your question to

    CA API Management Community

     

    You will need to be subscribed in order to view the responses from the community members.

     

    This forum is specifically meant for CA DevTest Solution.



  • 5.  Re: json path result
    Best Answer

    Posted May 14, 2018 05:47 AM

    Hi,

     

    We have JSON Filters available. If your JSON Schema is constant and it is not changing then we can go ahead with the existing filter but if it is changing then we will have to write the Script to handle. 

     

    Say your JSON schema is constant. then please use the  JSON Xpath filter as below.

     

    $.GUID[0] = " " Then act accordingly.

     

    Hope this helps.