Skip to content

Geo Primary Verification API: GET api/v4/admin/data_management/:model?query

Why are we doing this work

This work will be behind feature flag geo_primary_verification_view

We are building a view for customers to manage their instance's data and verify primary data integrity for Geo Improve primary verification experience (&16554)

important: This endpoint should be marked as experimental or beta until this work is complete to avoid issues with deprecations or removals as we explore what is needed.

note: The proposed endpoint may be changed based on decisions on the routing

What is needed in this change

This change is focused on expanding the API endpoint added in Geo Primary Verification API: GET `api/v4/admin... (#537707 - closed) to support query parameters.

Expected query parameters

  1. ?page/?per_page
    • Since we use offset pagination in REST we need to support that in the API
    • I imagine there is a pagination service somewhere in the rails app that we can include
  2. ?sort
    • id_desc|asc
    • created_desc|asc
    • last_checksum_desc|asc only when enabled
  3. ?ids
    • This should support a list of IDs to create a very specific curated list
  4. ?checksum_status
    • This will only be available when checksumming is enabled. This will allow us to filter by the checksum_status ENUM

Update: as per #537710 (comment 2756957244) the sort parameter will be added subsequently in #570726

Relevant links

Implementation plan

This is an extension from #537707 (closed). A simple plan would be to:

  1. add the parameters to the endpoint created in the aforementioned issue;
  2. add a service with the logic for sorting, ids and checksum status;
  3. add pagination if it wasn't added by default when generating the endpoint in the previous issue.
Edited by 🤖 GitLab Bot 🤖