API endpoint to retrieve all audit events under a given group
Problem to solve
Users today wish to retrieve all Audit Events from their Gitlab groups and child projects. This currently requires them to iterate through each project and subgroup and call the specific API. This is a lot of extra steps for groups that have multiple sub-groups and projects. It also means audit event replies come in at different times depending on when the API call started. It also may put a large load on the GitLab system to do all these requests at once.
Proposal
Provide an API to retrieve all audit events for a given group. It should return:
- Audit events relevant to that group itself
- Audit events for any subgroups in that group
- Audit events for any projects in that group or its subgroups.
Please see here for previous state of this feature #337757 (comment 1429950717). From there here are potential follow up solutions:
- API that triggers background job, that then generates a report
- issue: how to deliver report as it will likely be over the limit for an email attachment
- API where clients provide us an endpoint to push the results to
- allows us to generate the payload asynchronously
- issue: requires work for customers to provide and secure an endpoint
- An API pass-through
- customers query one API, and we then query the relevant group and projects APIs for them
- issue: pagination, ordering, and timeouts might all be issues
- ???
Performance
This API will return a large amount of data potentially. As such, we must consider the impact on performance. Some things to consider:
- Can we deliver results with pagination?
- Can we do some sort of "async" response?
- Do we have opportunities to improve performance by combining queries rather than using many, smaller queries?
More details
- Existing API docs
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.