KSC Open API
Kaspersky Security Center API description
ListTags::RenameTag ( wstring  szwOldTagValue,
wstring  szwNewTagValue,
params  pParams = NULL 
)

Rename a tag.

Allows to rename tag. If szwOldTagValue is assigned to some objects then szwNewTagValue will be also assigned to these objects. So RenameTag is not equivalent to deleting szwOldTagValue and adding szwNewTagValue

Parameters:
szwOldTagValuenon-empty old tag value of type (wstring)
szwNewTagValuenon-empty new tag value of type (wstring)
pParamsreserved. (params)

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')
        # set "CustomTag" for host
        oTagsControl.AddTag("CustomTag", {})
        # rename it
        oTagsControl.RenameTag("CustomTag", "NewCustomTag", {})