KSC Open API  13.0
Kaspersky Security Center API description
ServerHierarchy Class Reference

Server hierarchy management interface. More...

List of all members.

Public Member Functions

array GetChildServers (int nGroupId)
 Enumerate the secondary Administration Servers for specified group.
params GetServerInfo (int lServer, array pFields)
 Acquire the specified secondary Administration Server attributes.
int RegisterServer (wstring wstrDisplName, int nGroupId, binary pCertificate, wstring wstrNetAddress, params pAdditionalInfo)
 Register the new secondary Administration Server for the specified group.
 DelServer (int lServer)
 Remove the specified secondary Administration Server.
 UpdateServer (int lServer, params pInfo)
 Modify the specified secondary Administration Server attributes on the primary Administration Server.
int FindSlaveServers (wstring wstrFilter, array pFieldsToReturn, array pFieldsToOrder, params pParams, int lMaxLifeTime,[out] wstring wstrIterator)
 Searches for the secondary Administration Servers meeting specified criteria.

Detailed Description

Server hierarchy management interface.

With KlAkOAPI Python package server hierarchy object can be created and used as show below:

    server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
    oServerHierarchy = KlAkOAPI.ServerHierarchy.KlAkServerHierarchy(server)
    oChildServers = oServerHierarchy.GetChildServers(-1).RetVal()
    for oChildServer in oChildServers:
        print("Server's '" + oChildServer["KLSRVH_SRV_DN"] + "', id=" + str(oChildServer["KLSRVH_SRV_ID"]) \
         + " status is " + (lambda: 'Inactive' if oChildServer["KLSRVH_SRV_STATUS"] == 0 else 'Active')())
    

For details see Sample. Creating and destroying a "primary/secondary" relation.