Follow

Scan Import API

Being a vulnerability management product, NormShield supports a variety of tool scan result outputs. There are also various ways to import existing scans including using portal user interface, designated portal local directory or here explained import API.

Note: Don't confuse this API with Scan Creation API, which creates a Scan in NormShield scan pipeline, whereas, Scan Import API, imports existing scan results to the portal database.

Scan Import API

https://nsserver/api/importscan/upload?companyname=[COMPANY_NAME]

Here's an example file upload HTTP call with example POST body;

POST /api/importscan/upload?companyname=Demo%20Inc.
User-Agent: None
X-NormShield-Token: vfe3xx72a-a4ea-4533-a611-5fc6xxxbeb
Accept: */*
Content-Type: multipart/form-data; boundary=----daryoqh5WrnUOp2JsQ4A

------daryoqh5WrnUOp2JsQ4A
Content-Disposition: form-data; name="file"; filename="myresults.xml"
Content-Type: text/xml

<?xml version="1.0" ?>
<NessusClientData_v2>
<Policy><policyName>FullScan</policyName>
...
</Policy>
<Report name="MyScanResults" xmlns:cm="http://www.nessus.org/cm">
...
</Report>
</NessusClientData_v2>

------daryoqh5WrnUOp2JsQ4A--

When successfull 200 OK will be returned with the below message or similar and a new Scan Configuration will be formed including the imported scan results.

" XML scan result file is imported successfully.<br/>"

When failed 500 Error will be returned with

{"Message":"An error has occurred."}

or

" - One or more errors occurred. "
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk