Get audit messages and param values in non XML format.
search cancel

Get audit messages and param values in non XML format.


Article ID: 12622


Updated On:


CA API Gateway


The audit sink policy can be written to obtain the desired information from gateway audits. We can write this policy to get the param values in the audit detail and iterate through these param values. 

In audit sink policy, the default way is using assertion "Convert audit record to XML" assertion to get audit message.

Can you please provide a logic where we get either the original row audit message or plain text message and also a logic which would iterate through the param values?


Component: APIGTW


The policy attached to the article audit_sink_policy_parameter.xml iterates through the parameters generated during auditing. Few audit detail assertions are also added to show what the context variables contain. The audit messages under "Associated Logs"  in "Gateway Audit Events" in policy manager  can be obtained using context variable ${i.current.fullText} show in assertion number 10

The main logic to obtain each parameter value is between assertion number 11-20 where the final value of the parameter is in ${target.current} and all parameter present can be seen in variable ${}.


Additional Information

Attachment: audit_sink_policy_parameter.xml

Further information on audit sink policy can be found here Working with the Audit Sink Policy

Attachments get_app