Layer7 API Management

  • 1.  Associated Log info in email

    Posted Nov 30, 2017 10:29 AM

    We have configured the API Gateway to send us an email when there are failures in requests.  I would like the email to contain the failure info information we get in the "Associated Logs".  Is there a way to do this?



  • 2.  Re: Associated Log info in email

    Posted Nov 30, 2017 03:33 PM

    Hi,

    You can use the Email Alert Assertion but it will not allow you to Attach at logs or files to it.

    You can add a context variable that you may have it predefined that is holding any Error codes which can be sent to you.

    Hope this helps

    Thanks

    Abs



  • 3.  Re: Associated Log info in email
    Best Answer

    Broadcom Employee
    Posted Dec 02, 2017 11:31 AM

    If you are doing the logic of sending an email in the policy not in a Audit sink policy then you can use some of the Audit Context Variables. (Audit Context Variables - CA API Gateway - 9.2 - CA Technologies Documentation) The one I've seen that works the best is the ${audit.details.last.fullText} as it will grab the error that occurred within the last assertion executed and will provide the information that you see in the Associated Logs.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 4.  Re: Associated Log info in email

    Posted Dec 02, 2017 03:34 PM

    Thanks for putting me on the right track.  I used the audit context variable below and it seems to be working well.

     

    ${audit.details.2.fullText}



  • 5.  Re: Associated Log info in email

    Broadcom Employee
    Posted Dec 02, 2017 05:46 PM

    Please note that as you add assertions into the policy the ordinal of 2 may change depending on the positioning of the assertions.

     

    Sincerely,

     

    Stephen Hughes 

    Director, CA Support