This URL to import the nessus scan report file into Manager.
Resource URL
PUT domain/<domain_id>/integration/vulnerability/importscanreport
Content-type value
multipart/form-data; boundary=<x>
Request Parameters
URL Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| domain_id | Domain id | Number | yes |
Payload Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| MultiPart | Holds the body part objects | Object | Yes |
Details of BodyPart[0]:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| BodyPart[0] | Holds the report detail | Application/json object | Yes |
Details of report detail:
| Field Name | Description | Data Type |
|---|---|---|
| reportFileName | File name | String |
| reportType | Report type | String |
| description | Description | String |
| enableOnImport | Enable on import | Boolean |
Details of BodyPart[1]:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| BodyPart[1] | Holds the .nessus file as input stream | Application/octet-stream | Yes |
Details of .nessus file:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| File | Nessus scan report file | ByteArrayInput stream | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
| Field Name | Description | Data Type |
|---|---|---|
| status | Operation status | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/0/integration/vulnerability/importscanreport
----Boundary_1_12424925_1353496814940
Content-Type: application/json
{
"reportFileName": "Test1.nessus",
"reportType": "NESSUS",
"description": "test import",
"enableOnImport": true
}
----Boundary_1_12424925_1353496814940
Content-Type: application/octet-stream
ÒrÝ?ü0¥ÿ<ˆ}c,¢eXœ^:4 JhÍ2µ�rDYñÇÚd¶/¿í�F~ ÆIc§¼éá©ÿ_8Öø« C6Ô654îÞg‘J6?x ‚*T2¡qhã4ÎÅVµGƒo9ŸCÒª„í¹Ì —Áë&1¹ì,Ú‹y ì^î‘Vö5U
----Boundary_1_12424925_1353496814940--
Response
{
" status ": 1
}
Error Information
Following error codes are returned by this URL:
| No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
| 1 | 400 | 4301 | Invalid domain id |
| 2 | 400 | 7001 | Invalid scan report file |
| 3 | 400 | 2202 | No input stream |
| 4 | 400 | 7002 | Invalid report type |
| 5 | 400 | 7000 | Failed to import |