Layer7 API Management

  • 1.  How to use Response variables in CA API

    Posted Dec 12, 2018 09:25 AM

    Hello, I am new to CA API Gateway.

    So far I am able to create a proxy that connects to a back-end service through Route via http(s) assertion.

    My query is :

    How to retrieve the output values in case backend service responds with some value rather than just displaying a static text ? HTTPS Routing Properties promt displays Request Source :    <Default Request> & Response Destination :  <Default Request> & httpResponse1.



  • 2.  Re: How to use Response variables in CA API
    Best Answer

    Broadcom Employee
    Posted Dec 12, 2018 11:00 AM

    Hi Pramod,

     

    The route will return to the default response object. For example, if you route to www.ca.com the response will be the rendered HTML in a browser by default. If you are capturing the response in a message variable, httpResponse1 you can retrieve the response by referencing ${httpResponse1.mainpart} or if you are looking for more details on the response, ie: headers, you can use ${httpResponse1.http.allheadervalues}.

     

    More details on the variables can be found below.

     

    Message Routing Context Variables - CA API Gateway - 9.4 - CA Technologies Documentation 

    Message Layer Context Variables - CA API Gateway - 9.4 - CA Technologies Documentation 

     

    Regards,

    Joe



  • 3.  Re: How to use Response variables in CA API

    Posted Dec 12, 2018 11:19 AM

    Thanks so much Joe !!



  • 4.  Re: How to use Response variables in CA API

    Broadcom Employee
    Posted Dec 12, 2018 12:27 PM

    Glad to help Pradmod. If this was useful please do mark the answer as 'correct' so that others may find the same solution.

     

    Regards,

    Joe