The new docs.trellix.com features a modernized UI and AI-powered conversational search. Content is currently available in English, with additional languages launching in early November 2026. We hope you enjoy the updated experience.

Import the Exceptions

Prev Next

This URL imports the firewall policies.

Resource URL

POST /domain/<domain_id>/ exceptions/import

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 Request 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 import file element object Application/json object Yes

Details of ImportFileElement:

Field Name Description Data Type Mandatory
fileName Name of the file String Yes
fileType File type should be "XML" String Yes
skipDuplicate Whether the duplicate policies should be skipped(default is true) Boolean No

Details of BodyPart[1]:

Field Name Description Data Type Mandatory
BodyPart[1] Holds the file as Input stream Application/octet-stream Yes

Details of .xml file:

Field Name Description Data Type Mandatory
File Policy(file input stream) 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 Set to 1 if the operation was successful Number
message Message returned from the backend String

Example

Request

POST https://<NSM_IP>/sdkapi/domain/0/exceptions/import

Payload

----Boundary_1_12424925_1353496814940
Content-Type: application/json

{"fileType": "xml", "skipDuplicate": false, "fileName": "IDSAlertFilter"}



----Boundary_1_12424925_1353496814940
Content-Type: application/octet-stream

<?xml version='1.0' encoding='ISO-8859-1'?>
<AFConfig>
 <AlertFilterExport EMSVersion="8.1.3.1.22">
  <AlertFilter name="test1" visibleToChild="yes" addressType="0">
   <AlertExclusion srcMode="2" dstMode="3" srcAddr="null" srcMask="null" destAddr="null" destMask="null" srcPortType="0" srcPort="null" destPortType="0" destPort="null"/>
   <AlertExclusion srcMode="1" dstMode="1" srcAddr="null" srcMask="null" destAddr="null" destMask="null" srcPortType="0" srcPort="null" destPortType="0" destPort="null"/>
  </AlertFilter>
  <AlertFilter name="test2" visibleToChild="yes" addressType="0">
   <AlertExclusion srcMode="1" dstMode="1" srcAddr="null" srcMask="null" destAddr="null" destMask="null" srcPortType="0" srcPort="null" destPortType="0" destPort="null"/>
  </AlertFilter>
  <AlertFilter name="test3" visibleToChild="yes" addressType="0">
   <AlertExclusion srcMode="1" dstMode="1" srcAddr="null" srcMask="null" destAddr="null" destMask="null" srcPortType="0" srcPort="null" destPortType="0" destPort="null"/>
  </AlertFilter>
 </AlertFilterExport>
</AFConfig>

----Boundary_1_12424925_1353496814940-- 

Response

{
"status": 1,
"message": ",,Importing Alert Filter: test3,Importing Alert Filter: test2,Importing Alert Filter: test1"
} 
 

Error Information

Following error codes are returned by this URL:

No HTTP Error Code SDK API errorId SDK API errorMessage
1 404 1105 Invalid domain
2 400 5301 Invalid file type given for import
3 500 5307 Policy import failed.. Please look into the logs..
4 500 2202 Input stream read error