This URL updates details of the allowed or blocked file hash.
Resource URL
PUT /advancedmalware?type=<hashtype>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Hashtype. Can be allow or block. | String | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Old file hash value | String | Yes |
| New file hash value | String | No |
| File name | String | No |
| Comment | String | No |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Status. Set to 1 if the operation was successful. | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/advancedmalware?type=block
Payload
{
“oldFileHash”: "1aaaaaaaaaaaaaaaaaaaaaaaaaaaaa16"
"fileHash":"1aaaaaaaaaaaaaaaaaaaaaaaaaaa1116", "fileName":"file1",
"comment":"updated Blocked filehash "
}
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 | 1001 | Hash value is required |
2 | 500 | 1003 | Invalid file hash. It should be 32-digit hexadecimal value. |
3 | 500 | 1005 | This hash already exists on the allowlist/blocklist. |
4 | 500 | 1004 | Duplicate hash detected. A file with same hash already exists on this list. |
5 | 500 | 1001 | Please provide old hash value. |