REST API Reference > Data Integration REST API > File listeners
  

File listeners

Use the filelisteners resource to create, update, delete, run a file listener, and change the owner of a file listener association from one user to another. Informatica Intelligent Cloud Services can use file listeners to monitor specific folders. Informatica Intelligent Cloud Services are notified by using a call-back API when new files arrive at a monitored folder and when files in the folder are updated or deleted.
Consider the following when you use the filelisteners resource:
Note: If you use a tool such as Postman that automatically includes the HTTP version, do not enter the HTTP version in the URL. If the HTTP version appears twice in the URL, the request fails.
Complete the following tasks to run and monitor file listeners:

Getting file listener details

Use the GET request to view file listeners details. You can view the details for a particular file listener or view details for all file listeners in your organization.

GET request

To view the details of a particular file listener, include the file listener ID in the following URI:
Get <serverUrl>/mftsaas/api/v1/filelisteners/<filelistener ID>
To view the details for all of the file listeners in the organization, omit the file listener ID.

GET response

A request for file listener details returns the following information:
Field
Type
Description
id
String
ID number associated with the file listener.
name
String
Name of the file listener.
description
String
Description of the file listener.
status
String
Status of the file listener.
  • - enabled. Listens to files on the designated folder.
disabled. Does not listen to files on the designated folder.
agentGroup
Numeric
Runtime environment that contains the Secure Agent used to run the file listener.
type
String
Type of the connection to which the file listener listens.
connection
String
Connection to which the file listener listens.
folderPath
String
Path to the folder on the connection to which the file listener listens.
filePattern
String
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:
  • - Local folder
  • - Advanced FTP V2
  • - Advanced FTPS V2
  • - Advanced SFTP V2
  • - Azure Data Lake Store Gen2
patternType
String
The file pattern.
  • - wildcard. Use wildcard patterns of file name.
  • - regex. Use regular expression to match the file pattern. Consider the following examples:
    • - Use the following syntax to listen to all files except for files with a name that contains out, foo, and baz: ^(?!.*(?:out|baz|foo)).*$ à all except
    • - Use the following syntax to listen to all files with doc and docx, pdf extensions: ([a-zA-Z0-9\s_\\.\-\(\):])+(.doc|.docx|.pdf)$ à
  • - indicator file. Use the file name to which the file listener listens.
mandatory
String
Defines whether rule values are mandatory.
recursive
String
Defines whether rule values are recursive.
type
String
Frequency at which the file listener runs, daily, weekly, or monthly.
timezone
String
Time zone that refers to the start and end time.
startDate
Date/Time
Date on which the file listener starts running.
endDate
Date/Time
Date until which the file listener runs.
runIndefinitely
String
Whether the file listener runs without an end date.
startsAt
Date/Time
Time of day when the file listener starts running.
endsAt
Date/Time
Time of day when the file listener stops running.
frequency
Numeric
Frequency at which the file listener checks for files in the folder.
frequencyUnit
String
Unit of frequency to which file listener checks for files in the folder, by seconds, minutes, or hours.
listenerEvents
String
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:
  • - arrive. Send notifications when files arrive at the folder to which the file listener listens.
  • - update. Send notifications when files in the folder to which the file listener listens are updated.
  • - delete. Send notifications when files in the folder to which the file listener listens are deleted.
stopWhenRulesMet
String
Whether the file listener stops listening to the folder when the listener rules are met. Set to one of the following values:
  • - false. The file listener notifies the registered application on events and continues to listen for subsequent events.
  • - true. The file listener stops listening to the folder when the first event of file deletion occurs in the folder.
checkFileStability
String
Enter one of the following values.
  • - false.The file listener does not verify whether the entire file is copied to the folder before notifying the registered services.
  • - true. The file listener verifies whether the entire file is copied to the folder before notifying the registered services.
Default is true.
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, of the parameter is set to true.
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.
location
String
Location of the project folder that contains the file listener component.
createTime
Date/Time
Time when the component was created.
lastupdateTime
Date/Time
Time when the component was last updated.

GET response example for one file listener

If your request to view file listener details of the file listener with ID eX5qlosUfEHbwvNwGpRwQd is successful, you might receive a response similar to the following example:
{
"id": "eX5qlosUfEHbwvNwGpRwQd",
"name": "FL512087",
"description": "Demo",
"status": "ENABLE",
"agentGroup": "01000025000000000002",
"connection": {
"type": "local",
"name": "",
"connId": ""
},
"rules": [
{
"id": 10052,
"folderPath": "C:\\temp1",
"filePattern": "*.txt",
"postAction": "NONE",
"patternType": "wildcard",
"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"
},
"stopWhenRulesMet": false,
"listenerEvents": {
"arrive": true,
"update": true,
"delete": true
},
"checkFileStability": true,
"stabilityCheckInterval": 10,
"notifyExistingFiles": false,
"excludeFileEventsWhenNotRunning": true,
"continueOnError": true,
"location": {
"folderId": "avVCKODMM0RdSmcNWDnrKi",
"folderName": "New",
"projectId": "3iWWHkLbM2giVppBmJmZgV",
"projectName": "Default"
},
"createTime": "2019-02-12T07:03:49Z",
"lastUpdatedTime": "2019-02-12T07:03:49Z"
}

Response example to view all file listeners

If your request to view file listener details is successful, you might receive a response similar to the following example:
{
"listeners": [
{
"id": "8h9hng2kRokf2Db6Xb4pA8",
"name": "dfgdfg",
"description": "",
"status": "ENABLE",
"stopWhenRulesMet": false,
"checkFileStability": false,
"notifyExistingFiles": false,
"excludeFileEventsWhenNotRunning": true,
"continueOnError": true,
"location": {
"projectId": "3iWWHkLbM2giVppBmJmZgV",
"projectName": "Default"
},
"createTime": "2019-01-28T05:31:00Z",
"lastUpdatedTime": "2019-01-28T05:31:00Z"
},
{
"id": "bQdKQmGlFUUgS85AevLkqi",
"name": "FL123",
"description": "xsdfsdfsdf",
"status": "ENABLE",
"stopWhenRulesMet": false,
"checkFileStability": true,
"stabilityCheckInterval": 10,
"notifyExistingFiles": false,
"excludeFileEventsWhenNotRunning": true,
"continueOnError": true,
"location": {
"projectId": "3iWWHkLbM2giVppBmJmZgV",
"projectName": "Default"
},
"createTime": "2019-01-24T05:20:26Z",
"lastUpdatedTime": "2019-01-25T06:52:40Z"
},
{
"id": "eX5qlosUfEHbwvNwGpRwQd",
"name": "FL512087",
"description": "Demo",
"status": "ENABLE",
"stopWhenRulesMet": false,
"checkFileStability": true,
"stabilityCheckInterval": 10,
"notifyExistingFiles": false,
"excludeFileEventsWhenNotRunning": true,
"continueOnError": true,
"location": {
"folderId": "avVCKODMM0RdSmcNWDnrKi",
"folderName": "New",
"projectId": "3iWWHkLbM2giVppBmJmZgV",
"projectName": "Default"
},
"createTime": "2019-02-12T07:03:49Z",
"lastUpdatedTime": "2019-02-12T07:03:49Z"
}
]
}
If the request to view all file listeners is unsuccessful, you might receive a response similar to the following example:
File Listener not found (403 Forbidden)
{ "responseCode": "NOT_FOUND", "message": "File Listener with id 'eX5qlosUfEHbwvNwGpRwQd1' not found." }

Creating a file listener

Use a POST request to create a file listener and an event listener.

POST request

Use the following URI to create a file listener and an event listener:
POST <serverUrl>/mftsaas/api/v1/filelisteners
Use the following fields in the POST request:
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.
  • - enabled. Listens to files on the designated folder.
  • - disabled. Does not listen to files on the designated folder.
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:
  • - Local folder
  • - Advanced FTP V2
  • - Advanced FTPS V2
  • - Advanced SFTP V2
  • - Azure Data Lake Store Gen2
patternType
String
Yes
The file pattern.
  • - wildcard. Use wildcard patterns of file name.
  • - regex. Use regular expression to match the file pattern. Consider the following examples:
    • - Use the following syntax to listen to all files except for files with a name that contains out, foo, and baz: ^(?!.*(?:out|baz|foo)).*$ à all except
    • - Use the following syntax to listen to all files with doc and docx, pdf extensions: ([a-zA-Z0-9\s_\\.\-\(\):])+(.doc|.docx|.pdf)$ à
  • - Indicator File. Use the file name to which the file listener listens.
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:
  • - arrive. Send notifications when files arrive at the folder to which the file listener listens.
  • - update. Send notifications when files in the folder to which the file listener listens are updated.
  • - delete. Send notifications when files in the folder to which the file listener listens are deleted.
stopWhenRulesMet
String
-
The file listener stops listening to the folder when the listener rules are met.
  • - false. The file listener notifies the registered application on events and continues to listen for subsequent events.
  • - true. The listener stops listening to the folder when the first event of file deletion occurs in the folder.
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 request example

Use this sample as a reference to create a file listener.
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

}

POST response example

If the post request is successful, you might receive a response similar to the following example:
{
"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 request example

Use this sample as a reference to create an event listener.
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"
}
]
}

POST response example

If the post request is successful, you might receive a response similar to the following example:
{
"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"
}
]
}

Updating a file listener

Use a PUT request to update a file listener.

PUT Request

Use the following URI to update an existing file listener.
PUT <server URL>/mftsaas/api/v1/filelisteners/<filelistener ID>
Use the following fields in the PUT request:
Field
Type
Required
Description
id
String
Yes
ID number associated with the file listener.
name
String
Yes
Name of the file listener.
description
String
-
Description of the file listener.
status
String
Yes
Status of the file listener.
  • - enabled. Listens to files on the designated folder.
  • - disabled. Does not listen to files on the designated folder.
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:
  • - Local folder
  • - Advanced FTP V2
  • - Advanced FTPS V2
  • - Advanced SFTP V2
  • - Azure Data Lake Store Gen2
patternType
String
Yes
The file pattern.
  • - wildcard. Use wildcard patterns of file name.
  • - regex. Use regular expression to match the file pattern. Consider the following examples:
    • - Use the following syntax to listen to all files except for files with a name that contains out, foo, and baz: ^(?!.*(?:out|baz|foo)).*$ à all except
    • - Use the following syntax to listen to all files with doc and docx, pdf extensions: ([a-zA-Z0-9\s_\\.\-\(\):])+(.doc|.docx|.pdf)$ à
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:
  • - arrive. Send notifications when files arrive at the folder to which the file listener listens.
  • - update. Send notifications when files in the folder to which the file listener listens, are updated.
  • - delete. Send notifications when files in the folder to which the file listener listens are deleted.
stopWhenRulesMet
String
-
The file listener stops listening to the folder when the listener rules are met.
  • - false. The file listener notifies the registered application on events and continues to listen for subsequent events.
  • - true. The listener stops listening to the folder when the first event of file deletion occurs in the folder.
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 the 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 a failure, 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.

PUT request example

Use this sample as a reference to update the file listener.
PUT <serverUrl>/public/core/v1/filelisteners
Content-Type: application/json
Accept:application/json
Content-Type:application/json
IDS-SESSION-ID:{{IDS-SESSION-ID}}
{
"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

}

PUT response

If the request to update the file listener is successful, you receive the response similar to the following example:
{
"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"
}
}
If the request to update the file listener is unsuccessful, you might receive an error similar to the following example:
{
"responseCode": "NOT_FOUND",
"message": "File Listener with id 'eX5qlosUfEHbwvNwGpRwQd1' not found."
}

Deleting a file listener

Use a DELETE request to delete a file listener.

DELETE request

Use the following URI to delete a file listener:
DELETE <server URL>/mftsaas/api/v1/filelisteners/<file listener ID>
Use the following fields in the delete request:
Field
Type
Description
file listener ID
String
ID number associated with the file listener.

Delete response example

If the delete request is unsuccessful, you receive a response similar to the following example:
{
"responseCode": "NOT_FOUND",
"message": "Document Artifact with Id = bQdKQmGlFUUgS85AevLkqi3 not found."
}

Starting a file listener

Use a POST request to start a file listener job.

POST request

To start a file listener, use the following URI:
POST <server URL>/mftsaas/api/v1/filelisteners/<file listener ID>/start
Include the following field in the request:
Field
Type
Description
file listener ID
String
ID number associated with the file listener.

POST response example

If the request to start the file listener is successful, you might receive a response similar to the following example:
{
"status": "STARTED",
"jobId": 1038
}

POST error response example

If the request to start the file listener is unsuccessful, you might receive a response similar to the following example:
{
"responseCode": "NOT_FOUND",
"message": "File listener not found for ListenerId: bQdKQmGlFUUgS85AevLkqisd"
}

Response : Agent down (403 Forbidden)

{
"responseCode": "NOT_FOUND", "message": "Agent \"01000008000000000002\" in Agent Group \"01000025000000000002\" is not accessible."}

Stopping a file listener

Use a POST request to stop a file listener job.

POST request

To stop a file listener, use the following URI:
POST <server URL>/mftsaas/api/v1/filelisteners/<file listener ID>/stop
Include the following field in the request:
Field
Type
Description
fileListenerID
String
ID number associated with the file listener.

POST response example

If the request to stop the file listener is successful, you might receive a response similar to the following example:
{
"status": "STOPPED",
"jobId": 1038
}

POST response example

If the request to stop the file listener is unsuccessful, you might receive a response similar to the following example:
{
"responseCode": "NOT_FOUND",
"message": "File listener not found for ListenerId: bQdKQmGlFUUgS85AevLkqisd"
}

Response : Agent down (403 Forbidden)

{
"responseCode": "NOT_FOUND", "message": "Agent \"01000008000000000002\" in Agent Group \"01000025000000000002\" is not accessible."}

Getting the status of a file listener

Use a GET request to request the status of a file listener job.

GET request

To view the status of a file listener, use the following URI:
GET <server URL>/mftsaas/api/v1/filelisteners/job/<Job ID>/status
Include the following field in the request:
Field
Type
Description
Job ID
String
ID number associated with the file listener job.

GET response example

If the request to view the status of a file listener job is successful, you might receive a response similar to the following example:
{
"status": "STOPPED",
"jobId": 1038
}

GET response example

If the request to view the status of a file listener job is unsuccessful, you might receive a response similar to the following example:
{
"responseCode": "NOT_FOUND",
"message": "File listener not found for TaskId: 1079"
}

Getting file listener job details

Use a GET request to view the details of a file listener job.

GET request

To view the details of a file listener job, use the following URI:
GET <server URL>/mftsaas/api/v1/filelisteners/<Run ID>/activityLog
Include the following field in the request:
Field
Type
Description
Run ID
String
ID number associated with the file listener job.

GET response example

If the request to view the details of a file listener job is a success, you might receive a response similar to the following example:
{
"instanceName": "FL_1-1006",
"jobId": 1006
"startTime": "2021-02-09T22:38:01Z",
"updateTime": “2021-02-09T22:38:01Z”,
"endTime": “2021-02-09T22:38:01Z”,
"status": “Completed”,
}
The responses vary based on the file listener status.

Changing the owner of a file listener association

A file listener can be associated with a taskflow or with file ingestion tasks. You can use file listener as a source or schedule (trigger) for file ingestion tasks and as a trigger for a taskflow. A file listener association is the internal link between file listener and its associated file ingestion tasks or taskflows. The owner of a file listener association is the last person who selected the file listener as a source or schedule in a file ingestion task or the last person who published the taskflow with the file listener as a trigger.
You might want to change or transfer the owner of a file listener association when a user who owns the file listener association leaves the organization. For example, if the user Alex creates a file ingestion task, the user Beth creates a file listener, and the user Clara selects the file listener as a source or schedule in a file ingestion task, Clara is the owner of the file listener association. If Clara leaves the organization, you must reassign her assigned file listener associations to another user before you can delete her user account.

POST request

Use a POST request to change the owner of a file listener association from one user to an another.
Use the following URI to change the owner of a file listener association:
POST <serverUrl>/mftsaas/api/v1/ChangeCallbackOwnership
Use the following fields in the POST request:
Field
Type
Required
Description
currentOwner
String
Yes
User ID of the current owner.
newOwner
String
Yes
User ID of the new owner.

POST request example

Use this sample as a reference to change the owner of a file listener association.
POST <serverUrl>/mftsaas/api/v1/ChangeCallbackOwnership
Content-Type: application/json
Accept:application/json
Content-Type:application/json
IDS-SESSION-ID:{{IDS-SESSION-ID}}
{
"currentOwner": "{{UserIDwhoLeftTheOrganization}}",
"newOwner": "{{NewUserID}}"
}

POST response example

If the post request is successful, you might receive the following example:
200 OK