API endpoint to retrieve all audit events under a given group
This issue and linked pages contain information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. As with all projects, the items mentioned in this video and linked pages are subject to change or delay. The development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Release notes
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.
Currently, by enabling the audit_log_group_level
feature flag, this issue is fixed but with unacceptably poor performance. We should attempt to implement InOperatorOptimization
to make the generated query more performant. It's likely that this will fix the underlying problem, but we will need to approach this issue with caution knowing that it may not work and another solution will need to be found.
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?
What is the type of buyer?
Open Questions
- fill in
More details
- Existing API docs
- Consider looking at the Optimize compliance violations query (#363357 - closed) which also uses
InOperatorOptimization
.- MR: !93080 (closed)
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.