POST Import File Agent Configuration

Import File Agent Configuration API use to change the Import File Configuration.

Method URI

POST

/cdwebconsole/svc/faconfiguration/import

The following example shows the Command:
curl -X 'POST' \
  'https://172.20.183.160:9443/cdwebconsole/svc/faconfiguration/import' \
  -H 'Authorization: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbmlzdHJhdG9yOjE3Mi4yMC4xODUuOTU6MTM2Mzo1MTI5NzljMi01ZGU5LTQxZjgtYTg5Ni1mZWMzMmIyNWVlYmYiLCJleHAiOjE3MTQ1MDQwOTV9.S3Wv2GCpL4hV1CXMpRAH5Ij59e2jhZMLw7nIN4VVW1tziINTwofyNpFcTU3cJNnnDjPJsH8dNwt_jQqFni0-ow' \
  -H 'Content-Type: application/json' \
  -H 'X-XSRF-TOKEN: ef0c5ea5-3afa-4a0e-83d1-e24fb395957e' \
  -d '{"fileAgentData":"{\n  \"version\": 1,\n  \"minSupportedVersion\": 1,\n  \"basicConfig\": {\n \"comments\": \"File Agent Default config\",\n \"apiHost\": \"127.0.0.1\",\n \"apiPort\": 1363,\n \"apiUserID\": \"cduser\",\n \"apiSignonAlways\": true,\n 
\"watchFileInterval\": 1,\n \"fileCompletionDelay\": 1,\n 
\"fileAgentUniqueName\": \"FileAgent\",\n \"snmpListenerPort\": 1163,\n 
\"snmpStatusTimeInterval\": 30,\n \"info\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\"\n  },\n  
\"watchDirs\": {\n \"watchDirList\": {}\n  },\n  \"rules\": {\n \"ruleList\": [\n   
{\n  \"name\": \"Default rule\",\n  \"ruleStatus\": \"Disabled\",\n  \"comments\": 
\"Auto generated rule\",\n  \"lastModified\": \"2024-02-12T12:01:28.937Z\",\n  
\"procClass\": \"1\",\n  \"procPriority\": \"1\",\n  \"matchCriterion\": {\n   
 \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test7\",\n  \"ruleStatus\": 
\"Enabled\",\n  \"lastModified\": \"2024-04-24T06:03:25.093054034Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": [\n   {\n     \"enabled\": true,\n     
\"operator\": \"MATCH\",\n     \"field\": \"WATCH_FILENAME\",\n     
\"compareString\": \"abcd\"\n   },\n   {\n     \"enabled\": true,\n     
\"operator\": \"GREATER_THAN\",\n     \"field\": \"WATCH_FILESIZE\",\n     
\"compareString\": \"1000\"\n   }\n    ]\n  }\n   },\n   {\n  \"name\": \"Test3\",\n  
\"ruleStatus\": \"Disabled\",\n  \"lastModified\": \"2024-04-24T06:03:44.528583323Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": [\n   {\n     \"enabled\": true,\n     
\"operator\": \"MATCH\",\n     \"field\": \"WATCH_FILENAME\",\n     
\"compareString\": \"abcd\"\n   }\n    ]\n  }\n   },\n   {\n  \"name\": 
\"Test4\",\n  \"ruleStatus\": \"Disabled\",\n  \"lastModified\": 
\"2024-04-24T06:04:03.037180053Z\",\n  \"matchCriterion\": {\n    
\"criteriaList\": [\n   {\n     \"enabled\": true,\n     
\"operator\": \"GREATER_THAN\",\n     \"field\": \"WATCH_FILESIZE\",\n     
\"compareString\": \"1000\"\n   }\n    ]\n  }\n   },\n   {\n  \"name\": \"Test5\",\n  
\"ruleStatus\": \"Enabled\",\n  \"lastModified\": \"2024-03-06T18:34:46.826530Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test6\",\n  
\"ruleStatus\": \"Disabled\",\n  \"lastModified\": \"2024-03-06T18:34:46.840528900Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test10\",\n  
\"ruleStatus\": \"Disabled\",\n  \"lastModified\": \"2024-03-06T18:34:46.861529900Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test222\",\n  
\"ruleStatus\": \"Disabled\",\n  \"lastModified\": \"2024-03-06T18:34:46.904528800Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test2\",\n  
\"ruleStatus\": \"Disabled\",\n  \"comments\": \"Tetsing\",\n  \"lastModified\": 
\"2024-03-08T06:37:19.077411900Z\",\n  \"matchCriterion\": {\n    
\"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test22\",\n  
\"ruleStatus\": \"Disabled\",\n  \"lastModified\": \"2024-03-08T06:37:19.712409800Z\",\n  
\"matchCriterion\": {\n    \"criteriaList\": []\n  }\n   },\n   {\n  \"name\": \"Test1\",\n  
\"ruleStatus\": \"Disabled\",\n  \"comments\": \"Testing\",\n  \"lastModified\": 
\"2024-03-08T06:37:20.023409800Z\",\n  \"matchCriterion\": {\n    
\"criteriaList\": []\n  }\n   }\n ]\n  }\n}"}'
Table 1. Import File Agent Rule URI input parameters
Parameter Name Required/Optional Description Valid values

fileAgentData

Required

Specifies the data of File Agent Configuration File

 
The following example shows the HTTP User Request:
{
  "version": 1,
  "minSupportedVersion": 1,
  "basicConfig": {
    "comments": "File Agent Default config",
    "apiHost": "127.0.0.1",
    "apiPort": 1363,
    "apiUserID": "cduser",
    "apiSignonAlways": true,
    "watchFileInterval": 1,
    "fileCompletionDelay": 1,
    "fileAgentUniqueName": "FileAgent",
    "snmpListenerPort": 1163,
    "snmpStatusTimeInterval": 30,
    "info": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
  },
  "watchDirs": {
    "watchDirList": {}
  },
  "rules": {
    "ruleList": [
      {
        "name": "Default rule",
        "ruleStatus": "Disabled",
        "comments": "Auto generated rule",
        "lastModified": "2024-02-12T12:01:28.937Z",
        "procClass": "1",
        "procPriority": "1",
        "matchCriterion": {
          "criteriaList": []
        }
      }
    ]
  }
}	
The following example shows the Sample Response:
{
  "messageCode": 200,
  "message": "File Agent Configuration has been imported successfully"
}