----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74644/#review225927 -----------------------------------------------------------
Prashant - API "GET /service/zones/zones" doesn't support pagination, as it returns a List. APIs that support pagination return PList. If the caller needs only the summary, consider using API "GET /service/zones/summary"; this one supports pagination. - Madhan Neethiraj On Nov. 2, 2023, 9:24 a.m., Prashant Satam wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74644/ > ----------------------------------------------------------- > > (Updated Nov. 2, 2023, 9:24 a.m.) > > > Review request for ranger, Anand Nadar, Madhan Neethiraj, Monika Kachhadiya, > and Subhrat Chaudhary. > > > Bugs: RANGER-4460 > https://issues.apache.org/jira/browse/RANGER-4460 > > > Repository: ranger > > > Description > ------- > > Pagination not working for API ===> service/zones/zones > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java > 6513ad6b5 > > > Diff: https://reviews.apache.org/r/74644/diff/3/ > > > Testing > ------- > > Add multiple securityZones we are able to fetch zones by query params > pageSize,startIndex for API ===> service/zones/zones > Request-----> (/service/zones/zones?pageSize=2&startIndex=0) we should get > paginated list of security-zones > (i.e when pageSize=2 we should only receive 2 zone objects and when > startindex=0 it should fetch zone objects starting from position 0 from the > list in DB) > Response----------------> > { > "startIndex": 0, > "pageSize": 0, > "totalCount": 2, > "resultSize": 2, > "queryTimeMS": 1697171663643, > "securityZones": [ > { > "id": 2, > "isEnabled": true, > "createdBy": "Admin", > "updatedBy": "Admin", > "createTime": 1694692196000, > "updateTime": 1696073400000, > "name": "Gds_Security_Zone", > "services": { > "Resource_policy_Performance_test_50K": { > "resources": [ > { > "database": [ > "TT" > ], > "column": [ > "TT" > ], > "table": [ > "TT" > ] > } > ] > } > }, > "tagServices": [ > "Resource_policy_Performance_test_tag" > ], > "adminUsers": [ > "admin" > ], > "adminUserGroups": [ > "public" > ], > "auditUsers": [ > "admin" > ], > "auditUserGroups": [ > "public" > ] > }, > { > "id": 3, > "isEnabled": true, > "createdBy": "Admin", > "updatedBy": "Admin", > "createTime": 1694692284000, > "updateTime": 1694692284000, > "name": "Test-Zone-admin", > "services": { > "Resource_policy_Performance_test_50K": { > "resources": [ > { > "database": [ > "DD" > ], > "column": [ > "DD" > ], > "table": [ > "DD" > ] > } > ] > } > }, > "adminUsers": [ > "rangerusersync" > ], > "adminUserGroups": [ > "public" > ], > "auditUsers": [ > "admin" > ], > "auditUserGroups": [ > "public" > ], > "description": "Test-Zone-admin" > } > ] > } > > > Thanks, > > Prashant Satam > >
