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.
Settings
Parameter |
Type |
Description |
---|---|---|
|
string |
Unique ID of the external system used for authorization in Kaspersky Anti Targeted Attack Platform. |
|
file |
Contents of the scanned object. |
|
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. |
|
string |
Type of scanned object. Possible value of the parameter: |
|
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 |
---|---|
|
Scan completed successfully. |
|
Authorization required. |
|
Number of requests exceeded. Repeat the request later. |
|
Internal server error. Repeat the request later. |
Example of entering a command with switches
|