Request to scan objects

To create a request for scanning objects, the HTTP POST 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 POST "<URL of the server with the Central Node component>:<port, 443 by default>/kata/scanner/v1/sensors/<sensorId>/scans?sensorInstanceId=<sensorInstanceId>" -F "content=<path to the file that you want to scan>" -F scanId=<scan request ID> -F "objectType=file"

If the request is processed successfully, the OK status will be displayed.

Parameters

Parameter

Type

Description

sensorId

string

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

content

file

Contents of the scanned object.

scanId

string

Unique ID of the scan request. It must be generated in the external system. It cannot contain spaces or special characters. Do not use file names as a scan request ID.

If this parameter is not defined, viewing scan results is not available.

objectType

string

Type of scanned object.

Possible value of the parameter: file.

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.

401

Authorization required.

429

Number of requests exceeded. Repeat the request later.

500

Internal server error. Repeat the request later.

Example of entering a command with switches

curl --cert /root/cert.pem --key /root/server.key -X POST "https://10.10.10.1:443/kata/scanner/v1/sensors/dd11a1ee-a00b-111c-b11a-11001b1f1111/scans?sensorInstanceId=instance1" -F "content=@/tmp/test" -F scanId=1 -F "objectType=file"

Page top