This URL provides the supported file types/formats to be scanned.
Resource URL
PUT /domain/<domain_id>/filereputation/filetypes
Request Parameters:
URL parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain id | Number | Yes |
Payload parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of file formats and their status | ObjectList | Yes |
Details of fileStatus:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of file formats and their status | Object | No |
Details of fileType:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| File format | String | Yes |
| File format status, default is true | Boolean | No |
Response Parameters
Field Name | Description | Data Type |
|---|---|---|
| Status returned by updation | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/0/filereputation/filetypes
Payload:
{
"fileStatus":
[
{
"fileFormat": "apk",
"enabled": true
},
{
"fileFormat": "cpl",
"enabled": true
},
{
"fileFormat": "doc",
"enabled": false
},
{
"fileFormat": "docx",
"enabled": false
},
{
"fileFormat": "drv",
"enabled": false
},
{
"fileFormat": "exe",
"enabled": false
},
{
"fileFormat": "ocx",
"enabled": false
},
{
"fileFormat": "pdf",
"enabled": false
},
{
"fileFormat": "ppt",
"enabled": false
},
{
"fileFormat": "pptx",
"enabled": false
},
{
"fileFormat": "scr",
"enabled": false
},
{
"fileFormat": "sys",
"enabled": false
},
{
"fileFormat": "xls",
"enabled": false
},
{
"fileFormat": "xlsx",
"enabled": false
}
]
}
Response
{
"status":1
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 500 | 1101 | Internal error |
2 | 404 | 1105 | Invalid domain |
3 | 404 | 1105 | Invalid domain: This operation is only allowed for root domain |
4 | 400 | 7001 | File format is not valid |