Purpose
Scan of the object specified in the request body.
The following objects can be scanned:
Path
http://<server>:<port>/scans[?wait=1]
Settings
The optional wait
setting specifies the type of the scan session.
If the setting value is 1
, synchronous scan is performed and the application sends a report when scan finishes.
If the setting value is 0
, asynchronous scan is performed, and the response is as follows:
{
"id"="7d27e9b4-a4d7-469b-bdcf-ebfe953498e4",
"location"="/scans/7d27e9b4-a4d7-469b-bdcf-ebfe953498e4"
}
where:
Request headers
The request can contain the following headers:
Defines the type of the object submitted for scan.
Supported values:
API key specified in the KRAS4D_XAPIKEY environment variable or the xapikey variable in the configuration file.
Possible errors
If an unsupported value is specified in the Content-Type header, the application returns the following error:
{
"error"={
"code"="NOT_SUPPORTED_CONTENT_TYPE",
"details"="<content type>",
"message"="Not supported Content-Type"
},
"status"="error"
}