You can use the ReST API to control auditing and also run queries against the audit data for specific audit applications. It is also possible to clear auditing data using the API.
The Audit ReST API covers most of the audit functionality, see more in Managing Audit Applications and Logs.