KSC Open API
Kaspersky Security Center API description
|
Get tag values for specified list items. Retrieves tag values for specified list items
See also Python code with use of KlAkOAPI Python package below: server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False) oTagsControl = KlAkOAPI.ListTags.KlAkListTags(server, 'HostsTags') oHostIds = FindHosts(server) # see sample_tagcontrol.py for implementation details oTagArray = oTagsControl.GetTags(oHostIds, {}).RetVal() for oTagEntry in oTagArray: oTagValues = oTagEntry["KLTAGS_TAGS"] strTags = "" for oTagValue in oTagValues: if strTags != "": strTags += ", " strTags += oTagValue print("Tagged item id: ", oTagEntry["KLTAGS_ITEM_ID"], ", Tags set for this id: ", strTags) |