KSC Open API
Kaspersky Security Center API description
int HostGroup::GroupIdGroups ( )

ID of the predefined root group "Managed computers".

Returns:
(int) ID of the predefined root group "Managed computers".

See also how to use the KlAkOAPI Python package:

            server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
            oHostGroup = KlAkOAPI.HostGroup.KlAkHostGroup(server)
            nRootGroupId = oHostGroup.GroupIdGroups().RetVal()
            print('"Managed computers" group id is', nRootGroupId)