How to retrieve all audit entries using the audit log API in Bitbucket Server and Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Our Audit Log API allows you to fetch project and repository audits and we can re-iterate this over to get complete details. However, in case you need to get complete details in one call please refer to the below API.
Environment
7.X,8.X
Solution
The maximum capacity for this API call is set at 10,000. This limit has been established as a measure to safeguard the system from excessive load
1
curl --user <bitbucket-admin-username>:<password> -H "Accept:application/json" -X GET "<Bitbucket-base-url>/rest/auditing/1.0/events?limit=10000"
For the subsequent set of 10,000 audit entries, use the 'nextPageLink' URL, found at the end of the previous call. This allows you to retrieve additional 10,000 entry batches and so on.

Was this helpful?