B2B Gateway
- B2B Gateway
- All Products
POST <serverUrl>/mftsaas/api/v1/filelisteners
Field
| Type
| Required
| Description
|
---|---|---|---|
name
| String
| Yes
| Name of the file listener.
|
description
| String
| -
| Description of the file listener.
|
status
| String
| Yes
| Status of the file listener.
|
agentGroup
| Numeric
| Yes
| Runtime environment that contains the Secure Agent used to run the file listener.
|
connectionType
| String
| Yes
| Type of the connection to which the file listener listens.
|
connection
| String
| Yes
| Connection to which the file listener listens.
|
folderPath
| String
| Yes
| Path to the folder on the connection to which the file listener listens.
|
filePattern
| String
| Yes
| File name pattern to which the file listener listens.
|
Post Action
| String
| -
| Determines the action the file listener must perform after the file listener listens to the events.
You can select the post action as
Delete only if the file pattern is an indicator file. Default is None.
The following connection types support the Post Action option:
|
patternType
| String
| Yes
| The file pattern.
|
mandatory
| String
| -
| Defines whether rule values are mandatory.
|
recursive
| String
| -
| Defines whether rule values are recursive.
|
scheduleDefinition
| String
| Yes
| Defines the frequency in which the file listener must run.
|
type
| String
| Yes
| Frequency at which the file listener runs, daily, weekly, or monthly.
|
timezone
| String
| Yes
| Time zone that refers to the start and end time.
|
startDate
| Date/Time
| Yes
| Date on which the file listener starts running.
|
endDate
| Date/Time
| Yes
| Date until which the file listener runs.
|
runIndefinitely
| String
| -
| The file listener runs without an end date.
|
startsAt
| Date/Time
| Yes
| Time of day when the file listener starts running.
|
endsAt
| Date/Time
| Yes
| Time of day when the file listener stops running.
|
frequency
| Numeric
| Yes
| Frequency at which the file listener checks for files in the folder.
|
frequencyUnit
| String
| Yes
| Unit of frequency to which file listener checks for files in the folder, by seconds, minutes, or hours.
|
listenerEvents
| String
| Yes
| Determines when the file listener sends notifications to the services that are registered to it. Response to each event, when the event is set to true is as follows:
|
stopWhenRulesMet
| String
| -
| The file listener stops listening to the folder when the listener rules are met.
|
checkFileStability
| String
| -
| The file listener verifies that the entire file is copied to the folder before notifying the registered services.
|
stabilityCheckInterval
| Time
| -
| Time in seconds that a file listener waits to check for file stability.
You can specify a value in the stabilityCheckInterval field only if the checkFileStability option is set to
true .
|
notifyExistingFiles
| String
| -
| The first time the file listener runs, it sends a notification if files exist in the folder to which it listens.
|
excludeFileEventsWhenNotRunning
| String
| -
| Determines if you want to exclude file events that occur when a file listener is not running.
|
continueOnError
| String
| -
| Determines if you want the file listener to continue to retry and run in case of failures, such as temporary network disruption.
|
emailIds
| String
| -
| List of email addresses to send notifications if the file listener fails.
Use commas to separate email addresses in the list.
|
location
| String
| -
| Location of the project folder that contains the file listener component.
|
POST <serverUrl>/mftsaas/api/v1/filelisteners Content-Type: application/json Accept:application/json Content-Type:application/json IDS-SESSION-ID:{{IDS-SESSION-ID}} { "name": "{{NEWFILELISTENER-NAME}}", "description": "Demo", "status": "ENABLE", "location": { "folderId": "avVCKODMM0RdSmcNWDnrKi", "folderName": "New", "projectId": "3iWWHkLbM2giVppBmJmZgV", "projectName": "Default" }, "agentGroup": "01000025000000000002", "connection": { "type": "local", "name": "", "connId": "", "local": true }, "listenerEvents":{ "arrive":true, "update":true, "delete":true}, "checkFileStability": true, "stabilityCheckInterval": 10, "notifyExistingFiles": false, "excludeFileEventsWhenNotRunning": true, "continueOnError": true, "emailIDs":"test@gmail.com,infa@hotmail.com", "rules": [ { "id": 10070, "folderPath": "C:\\temp1", "patternType":"wildcard", "filePattern": "*.txt", "postAction": "NONE", "mandatory": false, "recursive": false } ], "scheduleDefinition": { "type": "DAILY_WITH_INTERVAL", "timezone": "IST", "startDate": "20181227", "endDate": "20181227", "runIndefinitely": false, "startsAt": "1015", "endsAt": "2355", "frequency": 15, "frequencyUnit": "SECONDS", "dayOfMonth": 0 }, "stopWhenRulesMet": false }
{ "id": "eX5qlosUfEHbwvNwGpRwQd", "name": "FL512087", "description": "Demo", "status": "ENABLE", "agentGroup": "01000025000000000002", "connection": { "type": "local", "name": "", "connId": "" }, "rules": [ { "id": 10070, "folderPath": "C:\\temp1", "filePattern": "*.txt", "patternType": "wildcard", "postAction": "NONE", "mandatory": false, "recursive": false } ], "scheduleDefinition": { "type": "DAILY_WITH_INTERVAL", "timezone": "IST", "startDate": "20181227", "endDate": "20181227", "runIndefinitely": false, "startsAt": "1015", "endsAt": "2355", "frequency": 15, "frequencyUnit": "SECONDS", "dayOfMonth": 0 }, "stopWhenRulesMet": false, "listenerEvents": { "arrive": true, "update": true, "delete": true }, "checkFileStability": true, "stabilityCheckInterval": 10, "notifyExistingFiles": false, "excludeFileEventsWhenNotRunning": true, "continueOnError": true, "emailIDs":"test@gmail.com,infa@hotmail.com", "location": { "folderId": "avVCKODMM0RdSmcNWDnrKi", "folderName": "New", "projectId": "3iWWHkLbM2giVppBmJmZgV", "projectName": "Default" } }
POST <serverUrl>/public/core/v1/filelisteners Content-Type: application/json Accept:application/json Content-Type:application/json IDS-SESSION-ID:{{IDS-SESSION-ID}} { "name": "{{NEWEVENTLISTENER-NAME}}", "description": "", "agentGroup": "01000025000000000003", "sourceType": "Server", "location": { "projectId": "1UNDIQkHQYKcNLPdxeR56p", "projectName": "overRide" }, "eventProvider": "AS2", "eventType": "as2_message_receive_failed", "rules": [ { "key": "event.userName", "value": "Suraj", "operator": "NONE", "type": "CONTAINS" }, { "key": "event.fileName", "value": "Test", "operator": "AND", "type": "STRING_EQUALS" }, { "key": "event.fileSize", "value": "89", "operator": "OR", "type": "INTEGER_EQUALS" } ] }
{ "id": "f11rC9Kwa0UlOeg2TIjBks", "name": "EventFL684930", "description": "", "agentGroup": "01000025000000000003", "sourceType": "Server", "location": { "projectId": "1UNDIQkHQYKcNLPdxeR56p", "projectName": "overRide" }, "createTime": "2020-04-06T05:25:55Z", "lastUpdatedTime": "2020-04-06T05:25:55Z", "eventProvider": "AS2", "eventType": "as2_message_receive_failed", "rules": [ { "key": "event.userName", "value": "Suraj", "operator": "NONE", "type": "CONTAINS" }, { "key": "event.fileName", "value": "Test", "operator": "AND", "type": "STRING_EQUALS" }, { "key": "event.fileSize", "value": "89", "operator": "OR", "type": "INTEGER_EQUALS" } ] }