Kaspersky Scan Engine

Format of a scan POST request

Scan POST requests have the following format:

* Request headers *

 

* Request body *

{

"timeout": %TIMEOUT%,

"omitCleanSubobjectResults": %TO_OMIT_CLEAN_SUBOBJECT_RESULTS%,

"url": "%URL%",

"requestHeaders": "%REQUEST_HEADERS%",

"responseHeaders": "%RESPONSE_HEADERS%",

"object": "%OBJECT%"

}

where:

  • timeout is the object scan timeout in milliseconds (ms). This field is optional.
  • omitCleanSubobjectResults is a binary flag that specifies whether the subObjectsScanResults array returned in the response must contain objects with the CLEAN scan result. If the value is true, such objects are omitted; if the value is false, such objects are retained. The default value is true. This field is optional

    For more information on the structure of the subObjectsScanResults array, see section "Format of a response to a scan POST request".

  • url is the URL to use as the scan task context. This field is optional.

    This field can be used for increasing the detection rate. For more information, see section "Increasing the detection rate".

  • requestHeaders specifies the text of the HTTP request headers extracted from the HTTP transaction message. This field is optional.

    This field can be used for increasing the detection rate. For more information, see section "Increasing the detection rate".

  • responseHeaders specifies the text of the HTTP response headers extracted from the HTTP transaction message. This field is optional.

    This field can be used for increasing the detection rate. For more information, see section "Increasing the detection rate".

  • object is the full path to the file to scan (if a request is made to /api/v3.0/scanfile) or a Base64-encoded string (if a request is made to /api/v3.0/scanmemory). This field is mandatory.

If the request body contains any special characters, they must be escaped in accordance with Standard ECMA-404 (The JSON Interchange Syntax).