Duplicate directories error when updating folder exceptions via the SEPM RestAPI
search cancel

Duplicate directories error when updating folder exceptions via the SEPM RestAPI

book

Article ID: 399837

calendar_today

Updated On:

Products

Endpoint Security Complete Endpoint Protection

Issue/Introduction

When attempting to add exceptions with the same "directory" and "pathvariable", but with a different "scantype", the following error is observed:

{
  "errorCode": "400",
  "appErrorCode": "",
  "errorMessage": "Duplicate directories [WINDOWS]\\[FOLDER_NAME]\\"
}

 

Environment

SEP 14.x RestAPI

The data being imported looks similar to the following:

{
    "configuration": {
        "directories": [
      {
        "rulestate": {
          "enabled": true
        },
        "scancategory": "AllScans",
        "scantype": "SecurityRisk",
        "pathvariable": "[WINDOWS]",
        "directory": "[FOLDER_NAME]\\",
        "recursive": false
      },
      {
        "rulestate": {
          "enabled": true
        },
        "scancategory": "AllScans",
        "scantype": "SONAR",
        "pathvariable": "[WINDOWS]",
        "directory": "[FOLDER_NAME]\\",
        "recursive": false
      }
        ]
    },
    "name": "Exceptions policy"
}

Cause

During input validation, only the "directory" is being evaluated for duplicates.

Resolution

Broadcom is aware of this issue and investigating further.  This article will be updated as more information is available.

Workaround
Use the SEPM UI to add multiple "scantype" for a "directory".

Additional Information

CRE-21508