
{
    "basePath":"/mftapp/rest/v1",
    "info":{
        "title":"Event Service REST API for Oracle Managed File Transfer",
        "version":"2015.08.31",
        "description":""
    },
    "paths":{
        "/sources":{
            "get":{
                "description":" Gets the list of sources active in MFT based on the criteria like application type, binding type, etc. The response contains the list of sources with URLs.",
                "summary":"Get available active sources",
                "operationId":"get /sources",
                "produces":[
                    "application/json"
                ],
                "consumes":[
                ],
                "parameters":[
                    {
                        "type":"string",
                        "name":"searchFilter",
                        "in":"query",
                        "description":"Full/partial Name of source(s) to be discovered",
                        "required":false
                    },
                    {
                        "type":"string",
                        "name":"application",
                        "in":"query",
                        "description":"Type of the application binding you want to discover",
                        "required":false
                    },
                    {
                        "type":"string",
                        "name":"bindingType",
                        "in":"query",
                        "description":"Binding type of source you want to discover",
                        "required":false
                    },
                    {
                        "type":"boolean",
                        "name":"onlyEventEnabled",
                        "in":"query",
                        "description":"Discover only event enabled sources",
                        "required":false
                    }
                ],
                "responses":{
                    "200":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"source",
                            "properties":{
                                "sources":{
                                    "id":"sources",
                                    "type":"array",
                                    "description":"Sources discovered",
                                    "items":[
                                        {
                                            "type":"object",
                                            "properties":{
                                                "name":{
                                                    "id":"name",
                                                    "description":"Name of the source.",
                                                    "type":"string"
                                                },
                                                "url":{
                                                    "id":"url",
                                                    "description":"URL of the source.",
                                                    "type":"string"
                                                },
                                                "bindingType":{
                                                    "id":"bindingType",
                                                    "description":"Binding type of the source.",
                                                    "type":"string"
                                                },
                                                "eventInvokeUrl":{
                                                    "id":"eventInvokeURL",
                                                    "description":"URL at which to invoke the event.",
                                                    "type":"string"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        },
                        "description":""
                    },
                    "404":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"errorSources",
                            "type":"object",
                            "title":"Error information.",
                            "properties":{
                                "errorCode":{
                                    "id":"errorCode",
                                    "type":"string",
                                    "description":"The error code that Oracle Managed File Transfer returns."
                                },
                                "errorKey":{
                                    "id":"errorKey",
                                    "type":"string",
                                    "description":"The error key that Oracle Managed File Transfer returns."
                                },
                                "errorMessage":{
                                    "id":"errorMessage",
                                    "type":"string",
                                    "description":"A message describing the error that Oracle Managed File Transfer returns."
                                }
                            }
                        },
                        "description":""
                    }
                },
                "tags":[
                    "Discover Sources"
                ],
                "x-internal-id":"sources-get"
            }
        },
        "/events":{
            "post":{
                "description":" Triggers the file transfer from the specified source, submitting the file to MFT for processing. Responds with a unique id called \"eventSessionid\" which is used to track the event status and to get the resulting instance details.",
                "summary":"Trigger a source",
                "operationId":"post /events",
                "produces":[
                    "application/json"
                ],
                "consumes":[
                    "application/json",
                    "application/xml"
                ],
                "parameters":[
                    {
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"Trigger a Source",
                            "type":"object",
                            "properties":{
                                "sourceName":{
                                    "id":"sourceName",
                                    "type":"string",
                                    "description":"Name of the source to be triggered."
                                },
                                "properties":{
                                    "type":"object",
                                    "description":"Properties passed with the source name.",
                                    "properties":{
                                        "entry":{
                                            "description":"Each entry is a key pair value of 'string'.",
                                            "type":"array",
                                            "items":[
                                                {
                                                    "type":"object",
                                                    "properties":{
                                                        "key":{
                                                            "type":"string",
                                                            "pattern":"^(/[^/]+)+$"
                                                        },
                                                        "value":{
                                                            "type":"string",
                                                            "pattern":"^(/[^/]+)+$"
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        },
                        "name":"body",
                        "in":"body",
                        "description":"",
                        "required":false
                    }
                ],
                "responses":{
                    "200":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"event",
                            "type":"object",
                            "properties":{
                                "eventSessionId":{
                                    "id":"eventSessionId",
                                    "type":"string",
                                    "description":"The ID of the event created."
                                }
                            }
                        },
                        "description":""
                    },
                    "404":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"error",
                            "type":"object",
                            "title":"Error information.",
                            "properties":{
                                "errorCode":{
                                    "id":"errorCode",
                                    "type":"string",
                                    "description":"The error code that Oracle Managed File Transfer returns."
                                },
                                "errorKey":{
                                    "id":"errorKey",
                                    "type":"string",
                                    "description":"A message describing the error that Oracle Managed File Transfer returns."
                                },
                                "errorMessage":{
                                    "id":"errorMessage",
                                    "type":"string",
                                    "description":"A message that describes the error that Oracle Managed File Transfer returns"
                                }
                            }
                        },
                        "description":""
                    }
                },
                "tags":[
                    "Invoke MFT Events"
                ],
                "x-internal-id":"events-post"
            }
        },
        "/events/{eventSessionId}":{
            "get":{
                "description":" Gets the event status and instances count for various statuses. Requires submitting an eventSessionId as a path parameter.",
                "summary":"Get the instances summary of an event",
                "operationId":"get /events/{eventSessionId}",
                "produces":[
                    "application/json"
                ],
                "consumes":[
                ],
                "parameters":[
                ],
                "responses":{
                    "200":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"eventStatus",
                            "type":"object",
                            "properties":{
                                "activeInstanceCount":{
                                    "id":"activeInstanceCount",
                                    "type":"integer",
                                    "description":"The number of active instances."
                                },
                                "completedInstanceCount":{
                                    "id":"completedInstanceCount",
                                    "type":"integer",
                                    "description":"The number of completed instances."
                                },
                                "failedInstanceCount":{
                                    "id":"failedInstanceCount",
                                    "type":"integer",
                                    "description":"The number of failed instances."
                                },
                                "status":{
                                    "id":"status",
                                    "type":"string",
                                    "description":"String value depicting status of the instance."
                                },
                                "comments":{
                                    "id":"comments",
                                    "type":"string",
                                    "description":"String value describing success or failure reason of the event."
                                }
                            }
                        },
                        "description":""
                    },
                    "404":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"errorGetEventStatus",
                            "type":"object",
                            "title":"Error information",
                            "properties":{
                                "errorCode":{
                                    "id":"errorCode",
                                    "type":"string",
                                    "description":"The error code that Oracle Managed File Transfer returns."
                                },
                                "errorKey":{
                                    "id":"errorKey",
                                    "type":"string",
                                    "description":"The error key that Oracle Managed File Transfer returns."
                                },
                                "errorMessage":{
                                    "id":"errorMessage",
                                    "type":"string",
                                    "description":"A message describing the error that Oracle Managed File Transfer returns."
                                }
                            }
                        },
                        "description":""
                    }
                },
                "tags":[
                    "Invoke MFT Events"
                ],
                "x-internal-id":"events-{eventSessionId}-get"
            }
        },
        "/events/{eventSessionId}/instances":{
            "get":{
                "description":" Retrieves details about the instances created by an event. Requires submitting an eventSessionId as a path parameter. Submit with query parameter inDetail=true for response to contain complete details of the resultant instances; submit without query parameter for response to contain minimal details.",
                "summary":"Get the details of the resultant instances of an event",
                "operationId":"get /events/{eventSessionId}/instances",
                "produces":[
                    "application/json",
                    "description"
                ],
                "consumes":[
                ],
                "parameters":[
                    {
                        "type":"boolean",
                        "name":"inDetail",
                        "in":"query",
                        "description":"Return complete details of of the resultant instances of an event.",
                        "required":false
                    }
                ],
                "responses":{
                    "200":{
                        "schema":{
                        },
                        "description":""
                    },
                    "404":{
                        "schema":{
                            "$schema":"http://json-schema.org/draft-04/schema#",
                            "id":"errorEventInstance",
                            "type":"object",
                            "title":"Error information.",
                            "properties":{
                                "errorCode":{
                                    "id":"errorCode",
                                    "type":"string",
                                    "description":"The error code that Oracle Managed File Transfer returns."
                                },
                                "errorKey":{
                                    "id":"errorKey",
                                    "type":"string",
                                    "description":"The error key that Oracle Managed File Transfer returns."
                                },
                                "errorMessage":{
                                    "id":"errorMessage",
                                    "type":"string",
                                    "description":"A message describing the error that Oracle Managed File Transfer returns."
                                }
                            }
                        },
                        "description":""
                    }
                },
                "tags":[
                    "Invoke MFT Events"
                ],
                "x-internal-id":"events-{eventSessionId}-instances-get"
            }
        }
    },
    "definitions":{
    },
    "tags":[
        {
            "name":"Discover Sources",
            "description":"Discover available active MFT sources."
        },
        {
            "name":"Invoke MFT Events",
            "description":"Trigger sources and get instance details of events."
        }
    ],
    "swagger":"2.0"
}