Skip to content

Geo Primary Verification: Add x-total header to Data Management API

Note

If the API performs poorly due to the COUNT query, we might have to consider supporting pagination keyset for this endpoint.

In order to support proper pagination for the Geo Primary Verification List UI, we need to expose the x-total header in the Data Management API response.

Implementation Guide

  1. Apply the following patch:
Index: ee/lib/api/admin/data_management.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/lib/api/admin/data_management.rb b/ee/lib/api/admin/data_management.rb
--- a/ee/lib/api/admin/data_management.rb	(revision 8de54cc86bc9ca86f550218e8090842264c9fa99)
+++ b/ee/lib/api/admin/data_management.rb	(date 1761206053453)
@@ -101,7 +101,7 @@
 
               relation = relation.order_by_primary_key
 
-              present paginate(relation.all, without_count: true), with: Entities::Admin::Model
+              present paginate(relation.all), with: Entities::Admin::Model
             end
 
             route_param :record_identifier,
Edited by 🤖 GitLab Bot 🤖