Skip to content
Snippets Groups Projects

Add keyset pagination to group audit events api

Merged Max Woolf requested to merge audit-event-keyset-pagination into master

What does this MR do and why?

How to set up and validate locally

  • Create a group (or use one that already exists)
  • Ensure that it contains a lot of group-level audit events.
  • Make an API query such as this (as a group owner or instance administrator)
GET /api/v4/groups/35/audit_events?per_page=2&pagination=keyset&order_by=created_at
  • In the response headers, check the Link header which should be in this format:
<http://127.0.0.1:3000/api/v4/groups/35/audit_events?cursor=eyJpZCI6IjIwMTYzOSIsIl9rZCI6Im4ifQ%3D%3D&id=35&order_by=created_at&page=1&pagination=keyset&per_page=2>; rel="next"
  • Make the same request again, adding cursor={CURSOR_FROM_HEADER_ABOVE} to the URL params and check that the results are the next ones in the set.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Relates to #333968 (closed)

Edited by Huzaifa Iftikhar

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Manoj M J
  • Evan Read
  • Evan Read removed review request for @eread

    removed review request for @eread

  • Max Woolf added 1 commit

    added 1 commit

    • 6174a7d9 - Backend reviewer suggestions

    Compare with previous version

  • Max Woolf added 1 commit

    added 1 commit

    • cf460152 - Backend reviewer suggestions

    Compare with previous version

  • Manoj M J
  • Manoj M J
  • Manoj M J
  • Manoj M J approved this merge request

    approved this merge request

  • Manoj M J removed review request for @manojmj

    removed review request for @manojmj

  • :wave: @manojmj, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Max Woolf added 1 commit

    added 1 commit

    • 4a76d45e - Apply 2 suggestion(s) to 2 file(s)

    Compare with previous version

  • Max Woolf requested review from @jprovaznik

    requested review from @jprovaznik

  • Jan Provaznik
  • Jan Provaznik
  • Jan Provaznik removed review request for @jprovaznik

    removed review request for @jprovaznik

  • Jan Provaznik requested review from @eread

    requested review from @eread

  • mentioned in issue #367528 (closed)

  • Max Woolf requested review from @jprovaznik

    requested review from @jprovaznik

  • Jan Provaznik resolved all threads

    resolved all threads

  • Jan Provaznik approved this merge request

    approved this merge request

  • Jan Provaznik enabled an automatic merge when the pipeline for 93287c69 succeeds

    enabled an automatic merge when the pipeline for 93287c69 succeeds

  • Max Woolf aborted the automatic merge because source branch was updated

    aborted the automatic merge because source branch was updated

  • Max Woolf added 1015 commits

    added 1015 commits

    Compare with previous version

  • Max Woolf resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading