Skip to content
View in the app

A better way to browse. Learn more.

Kaspersky Support Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ошибка вызова метода KSC OpenAPI SS_Read

Приветствую!

Разрабатываю в данный момент приложение для работы с API KSC. Хочу прочитать настройки существующей политики KES. Для этого получил ssId через метод Policy.GetPolicyContents. Далее вызвал SsContents.SS_GetNames. Для получения списка секций хранилища настроек для политики. Но не для одной из них не удается прочитать настройки через SsContents.SS_Read. Выдает следующую ошибку: 

{'PxgError': {'code': 1194, 'file': 'product/osmp/ksc/dev/std/proxygen/proxygen2.cpp', 'line': 87, 'message': "Call SsContents.SS_Read for the instance '' (listener '') does not exist (any more?)", 'module': 'KLSTD', 'subcode': 0}}

Насчет этой ошибки нашел другой тред на форуме KSC OpenAPI NagHstCtl.SendTaskAction - Kaspersky Endpoint Security для бизнеса - Kaspersky Support Forum. Но я так понимаю, что решение этой проблемы касается GatewayConnection. В документации не написано, что нужно использовать это для SsContents.

Помогите, пожалуйста, разобраться!

Версия KSC: 15.1.0

Фрагмент программного кода на Python:

    def getPolicyContents(self, policyId):
        response = post(f'{self.baseUrl}/api/v1.0/Policy.GetPolicyContents', headers=self.headers, data=json.dumps({'nPolicy': policyId, 'nRevisionId': 0, 'nLifeTime': 6000}), verify=self.sslCertPath)
        return response.json().get('PxgRetVal')
    
    def getSSSections(self, ssId, product='KES', version='11.0.0.0'):
        response = post(f'{self.baseUrl}/api/v1.0/SsContents.SS_GetNames', headers=self.headers, data=json.dumps({'wstrID': ssId, 'wstrProduct': product, 'wstrVersion': version}), verify=self.sslCertPath)
        return response.json().get('PxgRetVal')
    
    def ssRead(self, ssId, section, product='KES', version='11.0.0.0'):
        response = post(f'{self.baseUrl}/api/v1.0/SsContents.SS_Read', headers=self.headers, data=json.dumps({'wstrID': ssId, 'wstrProduct': product, 'wstrVersion': version, 'wstrSection': section}), verify=self.sslCertPath)
        return response.json()

Featured Replies

No posts to show

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.