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
-
?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
-
?sort
id_desc|asc
created_desc|asc
-
last_checksum_desc|asc
only when enabled
-
?ids
- This should support a list of IDs to create a very specific curated list
-
?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
- Routing discussion: Geo Primary Verification: Routing (#537677 - closed)
- API Endpoint Definition: Geo Primary Verification API: GET `api/v4/admin... (#537707 - closed)
Implementation plan
This is an extension from #537707 (closed). A simple plan would be to:
- add the parameters to the endpoint created in the aforementioned issue;
- add a service with the logic for sorting, ids and checksum status;
- add pagination if it wasn't added by default when generating the endpoint in the previous issue.