Request for scan results

To create a request for receiving scan results, the HTTP GET method is used. You can create a request by using the cURL command-line utility, for example.

You can set the parameters for executing a cURL command by using additional switches (see the table below).

Please refer to the cURL documentation for more information about cURL command switches.

Command syntax

curl --cert <path to the TLS certificate file> --key <path to the private key file> -X GET<URL of the server with the Central Node component>:<default port 443>/kata/scanner/v1/sensors/<sensorId>/scans/state?sensorInstanceId=<sensorInstanceId>&state=<one or more scan statuses that you want to display in scan results>"

If the request is sent successfully, a list of requests for scanning objects and the results of scanning these objects will be displayed. The scan results will be filtered by the statuses that you specified in the state parameter. For example, if you specified state = processing, detect in the request for scan results, the program will display only the object scan requests that are being processed or in which the program has detected a threat.

Parameters

Parameter

Type

Description

sensorId

string

Unique ID of the external system used for authorization in Kaspersky Anti Targeted Attack Platform.

state

array (string element type)

Object scan status. When this parameter is defined, the scan results will be filtered by status.

Indicate one or more statuses separated by commas.

The following parameter values are available:

  • detect;
  • not detected;
  • processing;
  • timeout;
  • error.

sensorInstanceId

string

Unique ID of the external system instance. Servers combined into a cluster are also considered to be instances of an external system. This parameter is optional.

Returned value

Return code

Description

200

Scan completed successfully.

204

No contents.

404

No scan results found for the specified ID.

500

Internal server error. Repeat the request later.

Example of entering a command with switches if you want to display all object scan statuses in the scan results

curl --cert /root/cert.pem --key /root/server.key -X GET "https://10.10.10.1:443/kata/scanner/v1/sensors/dd11a1ee-a00b-111c-b11a-11001b1f1111/scans?sensorInstanceId=instance1?&state=detect,not detected,processing,error,timeout"

Page top