Layer7 API Management

  • 1.  How to know global policy the result of service API

    Posted Nov 09, 2018 08:22 AM

    In the global policy[message-completed], How to know the result of API?

    If global policy[message-completed] is active, when http response is send to requestor?

    swervice API is completed? or global policy is completed?



  • 2.  Re: How to know global policy the result of service API
    Best Answer

    Broadcom Employee
    Posted Nov 09, 2018 11:27 AM

    Hi Isamu

     

    The message-completed policy will execute after the policy has finished in it's entirety.

     

    We state the following within our online documentation which you can reference here:

     

    Global Policy Fragments - CA API Gateway - 9.4 - CA Technologies Documentation 

     

    • message-completed: A policy of this type will run when processing for a message completes. It will run even if the service policy fails, an exception occurs, the service could not be resolved, or any other condition that prevents the service policy from being completed.

     

    Hope that helps.

     

    Daren



  • 3.  Re: How to know global policy the result of service API

    Posted Nov 10, 2018 04:04 AM

    Thank you Daren for your reply.

    I can understand when global policy[message-completed] will run.

    Next of my question is How can global policy[message-completed] know the result of processing for a message?

    For example, what is http response code(200 or 400 or 500?), what is http response header, what is response message body, etc.



  • 4.  Re: How to know global policy the result of service API

    Broadcom Employee
    Posted Nov 13, 2018 04:16 PM

    Hi Isamu,

     

    You can look to check the values of certain variables such as

    ${response.http.status}

    ${response.http.allheadervalues} 

    ${response.mainpart} 

     

    We document the available context variables here:

     

    Transport Layer Context Variables - CA API Gateway - 9.3 - CA Technologies Documentation 

     

     

    Regards,

    Daren