Background and Issues
In the Domino Leap Data access REST API (List Records), the recordCount property always returns -1 (uncalculated) to optimize system performance. However, this causes two main issues:
When an exact total count is required (e.g., for pagination), a full data fetch and client-side calculation are forced, causing unnecessary network and processing load.
The Swagger UI schema defines this property as "The number of records returned," which contradicts the actual behavior (-1) and causes confusion during implementation.
Proposed Improvements
Addition of an option to calculate the exact record count
While maintaining the default behavior (-1), it is requested to introduce a request parameter (e.g., &calculateCount=true) that explicitly triggers the calculation and returns the exact total record count (including filtered results) in the recordCount property.
Correction of the Swagger schema definition
To prevent further misunderstanding, the Swagger description should be updated to match the actual API specification.
(Proposed fix: "The number of records returned. Returns -1 if the total count is uncalculated.")