|This API is added since QuickBuild 6.0.6.|
Audits can be searched using http GET method through below url:
Query string part of the url represents various search criterias to restrict the search result. Supported search criterias are:
|username||Name of the user to audit. If not specified, audit log of all users will be searched.|
|source||Specify source of audit to match. The character * can be used in the source string to do wildcard match. If not specified, audits from all sources will be matched.|
|action||Action of the audit to match. If left empty, any action will be matched.|
|since||In the format of yyyy-MM-dd HH:mm, for example: 2009-11-12 13:00. If specified, search audits generated after this date|
|until||In the format of yyyy-MM-dd HH:mm, for example: 2009-11-12 14:00. If specified, search builds generated before this date|
|first||Specified first audit entry to return. If not specified, value 0 is assumed|
|count||Specified number of audit entries to return. This param must be specified in order not to mistakenly return all audits to stress the system|
The response is of mime type application/xml, and the content is XML representation of list of matched builds. If no any search criterias are specified, all builds in the system will be returned.
You will need to use http BASIC authentication to login as administrator if the anonymous does not have administative permission.
Below curl commands demonstrates how to combine different criterias to perform search:
- Search recent 100 audit entries for user robin under configuration tree root/test:
Make sure to append "/" to configuration path if you want to search against certain configuration as QuickBuild uses trailing slash to differenticate audits generated from configurations and other sources. In this example we also append * to end of source param to match all sub configurations under root/test
- Search all audits bewteen generated after 2015-01-12 13:00 and after 2015-01-12 23:00 in the system:
Here we use 2015-01-12+13:00 instead of 2015-01-12 13:00 as the white space in query string has to be encoded as plus sign.
Counting audits uses the same syntax as searching audits, except that: