Calling REST API to Create CSV file at FTP server through Oracle Integration Cloud (service)

 In this tutorial, we will develop a REST API and upon the call of it, CSV File with data will be generated at FTP Server





Create a connector for the FTP 




Fill the the mandatory details as shown in the screenshot




Enter FTP Server details on which you want to copy files



Test the connection















Now let's create the integration 







Select App Driven Orchestration 
Fill the relevant details 




Drop REST Connector on the pallette 






Fill the endpoint name which you want to call 





Select the Operation Post and provide the desired URI name





























Click on JSON Sample 







 copy the below format


{
"UserData":[
        {
         "id":"",
         "firstname":"",
         "lastname":"",
 "email":"",
         "qualification":""
      },
      {
         "id":"",
         "firstname":"",
         "lastname":"",
 "email":"",
         "qualification":""
      }
  ]
}





Provide Sample JSON for response as well




























{
  "status" : ""
}






click on Done













Now next step is to drop the FTP connector
fill the endpoint name 








Select the operation and provide the output directory  and also provide the file pattern name






if you have a sample file just upload it 











Click on Done 




Now the next step is to create Mapping. 






Map the Rest Request with CSV connector 



Now next step is to create Response mapping







Click on Status and create a Target Node to edit message "Success" 










Enable an identifier to track the integration




Run the integration by passing the payload in JSON format to create a csv file



Here you go file is created based on payload submitted




Here is the data 



Same thing you can do in Advance rest-client by copying the URL and calling it from the Advance rest client 

















In some cases you want to create column heading as well, in the current integration Column headings are not appearing to make sure column headings are available we need to rework on mapping

Delete the existing mapping 






Create a new mapping with the label names , just shown in the screenshots









Map with request columns for the data 




Here you go with the data along with column headings




Comments

Post a Comment

Popular posts from this blog

Sample HZ API's script to Create Contacts and Contact Points in Oracle

REST integration built-in OIC to read Large files with size more than 10MB