@@ -1349,21 +1349,24 @@ def get_subgroups(self, group, path):
1349
1349
# went through the tree without hits
1350
1350
return None
1351
1351
1352
- def get_group_children (self , group_id ):
1353
- """Get group children by id.
1352
+ def get_group_children (self , group_id , query = None ):
1353
+ """Get group children by parent id.
1354
1354
1355
1355
Returns full group children details
1356
1356
1357
- :param group_id: The group id
1357
+ :param group_id: The parent group id
1358
1358
:type group_id: str
1359
+ :param query: Additional query options
1360
+ :type query: dict
1359
1361
:return: Keycloak server response (GroupRepresentation)
1360
1362
:rtype: dict
1361
1363
"""
1364
+ query = query or {}
1362
1365
params_path = {"realm-name" : self .connection .realm_name , "id" : group_id }
1363
- data_raw = self . connection . raw_get (
1364
- urls_patterns . URL_ADMIN_GROUP_CHILD . format ( ** params_path )
1365
- )
1366
- return raise_error_from_response ( data_raw , KeycloakGetError )
1366
+ url = urls_patterns . URL_ADMIN_GROUP_CHILD . format ( ** params_path )
1367
+ if "first" in query or "max" in query :
1368
+ return self . __fetch_paginated ( url , query )
1369
+ return self . __fetch_all ( url , query )
1367
1370
1368
1371
def get_group_members (self , group_id , query = None ):
1369
1372
"""Get members by group id.
0 commit comments