Get available active sources

get

/mftapp/rest/v1/sources

Gets the list of sources active in MFT based on the criteria like application type or binding type. The response contains the list of sources with URLs. If you are invoking this API without any query parameters, you will get only sources with bindingType as Webservices such as SOA, SOAP, ODI, and OSB. To get other sources, pass bindingType and/or application parameters to the query. If the application and bindingType parameters are not provided then searchFilter and onlyEventEnabled filters are ignored. Supported Application Types include B2B, Healthcare, OSB, SOA, and, ODI. Supported Binding Types include Embedded-FTP, Embedded-SSH-FTP, File, FTP, SSH-FTP, WS, B2B, Healthcare, OCSS, and RIDC.

Request

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Describes active sources.
Body ()
Root Schema : activeSources
Type: object
Title: activeSources
Show Source
Nested Schema : sources
Type: array
Title: sources
Sources discovered
Show Source
Nested Schema : items
Type: object
Title: items
Show Source

500 Response

Error information.
Body ()
Root Schema : errors
Type: object
Title: errors
Show Source
Back to Top

Examples

Example of Response Body: 200 Response

The following cURL commands shows how to get the source details based on the various query parameters by submitting GET request on the REST resource:

To list all the files sources:

curl -I -X GET -u <username>:<password>  -H "Content-Type: application/json" 'http://<host>:<port>/mftapp/rest/v1/sources?bindingType=file' 

To list all the file sources with name containing string abc:

curl -I -X GET -u <username>:<password>  -H "Content-Type: application/json" http://host:port/mftapp/rest/v1/sources?bindingType=File&&searchFilter=abc

To list all Event-enabled FTP sources:

curl -I -X GET -u <username>:<password>  -H "Content-Type: application/json" http://host:port/mftapp/rest/v1/sources?bindingType=FTP&onlyEventEnabled=true

To list all SOA sources:

curl -I -X GET -u <username>:<password>  -H "Content-Type: application/json" http://host:port/mftapp/rest/v1/sources?application=soa

The following example shows the contents of the response body for a successful request in JSON format:

{
	"sources": [
	  {
		"name": "src1",
		"url": "/scratch/demo",
		"bindingType": "File",
		"eventInvokeUrl": "/mftapp/rest/v1/events"
	  },
	  {
		"name": "src2",
		"url": "/scratch/username",
		"bindingType": "File",
		"eventInvokeUrl": "/mftapp/rest/v1/events"
	  }
	]
}

Example - Example of Response Body: 500 Response

The following example shows the contents of the response body for an successful request in JSON format:

{
  "errorCode":"MFT-5403"
  "errorKey":"MFT_WS_DISCOVERY_COULD_NOT_QUERY_MFT_SOURCES"
  "errorMessage":"Discovery service is unable to query MFT Sources for the given application {application} and search Filter {search filter}."
}
Back to Top