KSC Open API  13.1
Kaspersky Security Center API description
HostGroup Class Reference

Processing hosts and managing groups. More...

List of all members.

Public Member Functions

wstring AddHost (params pInfo)
 Creates the new host record.
 UpdateHost (wstring strHostName, params pInfo)
 Modifies the specified attributes for the host.
array UpdateHostsMultiple (array pArrHostIds, params pProperties)
 Update attributes of multiple computers.
 RemoveHost (wstring strHostName)
 Removes the host record.
params GetHostInfo (wstring strHostName, array pFields2Return)
 Receives the specified host attributes.
int FindHosts (wstring wstrFilter, array vecFieldsToReturn, array vecFieldsToOrder, params pParams, int lMaxLifeTime,[out] wstring strAccessor)
 Finds hosts by using string filtering.
 MoveHostsToGroup (int nGroup, array pHostNames)
 Moves the multiple hosts to the specified administration group.
 MoveHostsFromGroupToGroup (int nSrcGroupId, int nDstGroupId,[out] wstring strActionGuid)
 Moves hosts from the source administration group to the target administration group.
 RemoveHosts (array pHostNames, boolean bForceDestroy)
 Removes the multiple hosts.
 ZeroVirusCountForGroup (int nParent,[out] wstring strActionGuid)
 Resets counters of viruses found on hosts in the specified administration group and all subgroups.
 ZeroVirusCountForHosts (array pHostNames,[out] wstring strActionGuid)
 Resets counters of viruses found on the specified hosts.
 AddHostsForSync (array pHostNames, wstring strSSType,[out] wstring strActionGuid)
 Syncs settings between the Administration Server and the host.
 AddGroupHostsForSync (int nGroupId, wstring strSSType,[out] wstring strActionGuid)
 Adds hosts from the specified administration group to the synchronization.
int GroupIdGroups ()
 ID of the predefined root group "Managed computers".
int GroupIdUnassigned ()
 ID of the predefined group "Unassigned computers".
int GroupIdSuper ()
 ID of the predefined group "Primary server".
int AddGroup (params pInfo)
 Creates a new administration group.
 UpdateGroup (int nGroup, params pInfo)
 Changes attributes of the existing administration group.
 RemoveGroup (int nGroup, int nFlags,[out] wstring strActionGuid)
 Deletes an administration group.
params GetGroupInfo (int nGroupId)
 Acquire administration group attributes.
params GetGroupInfoEx (int nGroupId, array pArrAttributes)
 Acquire administration group attributes.
array GetSubgroups (int nGroupId, int nDepth)
 Receives a tree of subgroups in the administration group.
int GetGroupId (int nParent, wstring strName)
 Receives the administration group ID by using its name and the parent group ID.
int FindGroups (wstring wstrFilter, array vecFieldsToReturn, array vecFieldsToOrder, params pParams, int lMaxLifeTime,[out] wstring strAccessor)
 Finds administration groups by using filtering strings.
 ResolveAndMoveToGroup (params pInfo,[out] params pResults)
 Moves the hosts to a group by a name or IP address.
array GetDomains ()
 Returnes a list of the Windows domains in the network.
array GetDomainHosts (wstring domain)
 Returns a list of the workstation names in the domain.
 AddDomain (wstring strDomain, int nType)
 Adds a new domain to the database.
 DelDomain (wstring strDomain)
 Removes a domain from the database.
params GetHostProducts (wstring strHostName)
 Returns information about installed products on the host.
params SS_Read (wstring strHostName, wstring strType, wstring strProduct, wstring strVersion, wstring strSection)
 Reads data from the host settings storage.
 SS_Write (wstring strHostName, wstring strType, wstring strProduct, wstring strVersion, wstring strSection, int nOption, params pSettings)
 Writes data into the host settings storage.
 SS_CreateSection (wstring strHostName, wstring strType, wstring strProduct, wstring strVersion, wstring strSection)
 Creates a section in the host settings storage.
 SS_DeleteSection (wstring strHostName, wstring strType, wstring strProduct, wstring strVersion, wstring strSection)
 Deletes a section from the host settings storage.
array SS_GetNames (wstring strHostName, wstring strType, wstring strProduct, wstring strVersion)
 Gets names of sections from the host settings storage.
params GetRunTimeInfo (array pValues)
 Returns the server run-time information.
params GetStaticInfo (array pValues)
 Returns the server statistics.
 RestartNetworkScanning (int nType)
 Restarts the specified network scanning type.
array GetHostfixesForProductOnHost (wstring strHostName, wstring strProductName, wstring strProductVersion)
 Returns an array of hotfixes for the specified host and product.
params GetAllHostfixes ()
 Returns all hotfixes installed in the network.
int FindIncidents (wstring strFilter, array pFieldsToReturn, array pFieldsToOrder, int lMaxLifeTime,[out] wstring strAccessor)
 Finds an incident by using filtering strings.
int AddIncident (params pData)
 Creates a new incident.
 UpdateIncident (int nId, params pData)
 Modifies properties of an existing incident.
 DeleteIncident (int nId)
 Deletes an incident.
int FindUsers (wstring strFilter, array pFieldsToReturn, array pFieldsToOrder, int lMaxLifeTime,[out] wstring strAccessor)
 Finds the existing users.
 SetLocInfo (params pData)
 Allows to specify the server localization information.
wstring GetHostTasks (wstring strHostName)
 Returns the specific server ID to get and manage the host tasks.
 FindHostsAsync (wstring wstrFilter, array vecFieldsToReturn, array vecFieldsToOrder, params pParams, int lMaxLifeTime,[out] wstring strRequestId)
 Finds hosts asynchronously by using filtering by the string.
 FindHostsAsyncCancel (wstring strRequestId)
 Cancels the FindHostsAsync operation.
int FindHostsAsyncGetAccessor (wstring strRequestId,[out] wstring strAccessor,[out] params pFailedSlavesInfo)
 Receives a result of the asynchronous FindHostsAsync operation.
array GetComponentsForProductOnHost (wstring strHostName, wstring strProductName, wstring strProductVersion)
 Returns an array of the product components for the specified host and product.
params GetInstanceStatistics (array vecFilterFields)
 Receives the server statistics.

Detailed Description

Processing hosts and managing groups.

By using the KlAkOAPI Python package, the HostGroup object can be created and used as shown below:

        server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
        oHostGroup = KlAkOAPI.HostGroup.KlAkHostGroup(server)
        nRootGroupId = oHostGroup.GroupIdGroups().RetVal()
        nNewGroupId = oHostGroup.AddGroup({'name': 'Test group', 'parentId': nRootGroupId}).RetVal()
        

For more information, see: