Working with the API

It is not possible to restrict access to the application through the REST API using Password Protection. For example, it is not possible to block a user from disabling protection through the REST API. You can configure Password Protection through the REST API and restrict user access to the application through the local interface.

To manage the application through the REST API, you need to run the REST client under the account that you specified when installing the application with REST API support. You can select only one user to work with the REST API.

OPEN THE REST API DOCUMENTATION

Managing the application through the REST API consists of the following steps:

  1. Get the current values of the application settings. To do so, send a GET request.

    Example:

    GET http://localhost:6782/kes/v1/settings/ExploitPrevention

  2. The application will send a response with the structure and values of settings. Kaspersky Endpoint Security supports XML- and JSON formats.

    Example:

    {

    "action": 0,

    "enableSystemProcessesMemoryProtection": true,

    "enabled": true

    }

  3. Edit the application settings. Use the settings structure received in response to the GET request.

    Example:

    {

    "action": 0,

    "enableSystemProcessesMemoryProtection": false,

    "enabled": true

    }

  4. Save application settings (the payload) in a JSON (payload.json).
  5. Sign the JSON in the PKCS7 format.

    Example:

    $ openssl smime -sign -in payload.json -signer cert.pem -inkey key.pem -nodetach -binary -outform pem -out signed_payload.pem

    As a result, you get a signed file with the payload of the request (signed_payload.pem).

  6. Edit the application settings. To do so, send a POST request and attach the signed file with the request payload (signed_payload.pem).

The application applies the new settings and sends a response containing the application configuration results (the response can be empty). You can verify that the settings are updated using a GET request.

Page top