Enter your keyword

post

File Upload Process in Integration Cloud Services REST API

File upload is a very common aspect of each and every technology we used in our day to day projects as part of the REST service. This is very common requirement to upload a file that resides in the local computer and send it to the remote computer.Sometimes we need to expose a REST service which should allow to upload files, process the data and store it some repository like a database, FTP etc..

In this blog, we are going to show how to use ICS REST adapter feature to upload a file and save the file as it is on some FTP location.

Below are the steps to achieve the use case:

  • Create REST Adapter as Trigger
  • Create FTP Adapter as Invoke
  • Create Orchestration Integration
  • TEST the Integration

Create REST Adapter as Trigger

There is one dedicated blog that explains, how to configure REST Adapter in Oracle ICS. Please have a look at the blog

Create FTP Adapter as Invoke

This has also been explained in another blog that shows, how to configure FTP Adapter in Oracle ICS. Please have a look at the blog

Create an Orchestration Integration

Create an Orchestrated Integration using steps:

  • Login into ICS console
  • Click on the Integration tile from ICS home page
  • Click on Create button from upper right corner
  • Select Orchestration pattern from the dialog box
  • Enter Below information and click on Create button
    • Select Application event or business object radio button
    • Enter Integration Name in What do you want to call your integration text box
    • An Identifier would be picked up automatically from Integration name, however, we can edit it
    • Let the Version as it is
    • Enter the description in What does this integration do input box
    • Leave the package input box as it is
 
  • Drag the TEST_REST_Conn Connection on the canvas from REST connection
  • Enter below information and Click Next
    • Name of the endpoint
    • Relative URI(must start with /)
    • Select HTTP verb as POST
    • Select Configure a request payload for this endpoint checkbox- This option allows us to assign payload in the next step
  • Select Accept attachments from request and Request in HTML form checkboxes then click Next and Done button
  • Drag & Drop the FTP connection on the canvas
  • Enter the Name in What do you want to call the endpoint input box and click Next button
  • Enter below information and click Next button
    • Select Operation: Select Write File
    • Select a Transfer Mode: Choose ASCII
    • Specify an Output directory: Enter the directory where you want to save the uploaded file
    • Specify a File Name Pattern: Enter the file name
 
  • Choose No under the Do you want to define a schema for this endpoint and click Next -> Done button
 
  • Edit the mapper and map the below
    • execute -> attachments -> attachment -> attachmentReference to ICSfile -> FileReference
    • partName -> fileName
partName element would contain the file name that will be uploaded
 
 
That configuration completes the integration.
 
Let’s test the integration using POSTMAN tool:
 
 
 
Check the FTP location output directory that has been given during configuring FTP adapter.

 

Some Toughts (15)

  1. Anonymous
    added on 14 Dec, 2017
    Reply

    Hello Ankur,
    Can you please share any usecase that uses the zip directory option in Stage file of an integration.

  2. added on 14 Dec, 2017
    Reply

    Hi,

    What is the exact use case you are looking for so that i can write something for you.

    Regards,
    Ankur

  3. Anonymous
    added on 15 Dec, 2017
    Reply

    We are having a requirement of zipping the files in the ftp location.Can you please write something on this use case.

  4. added on 8 Jan, 2018
    Reply

    Hi Ankur,
    Can you please tell steps to get data from erp cloud and save it to csv file?

  5. added on 10 Jan, 2018
    Reply

    Hi Pooja,

    You can make schedule integration that subsequently call erp service to get the required data and then call FTP adapter to create CSV file.

    Regards,
    Ankur

  6. Reply

    http://eg4link.com/WPXakP make money online in home from Upload and share files payments methods PayPal account western Union Bitcoin all Payments methods u like

  7. Anonymous
    added on 18 Mar, 2018
    Reply

    https://eg4link.co/ref/Ahmadof1234 make money from eg4link

  8. added on 23 Nov, 2018
    Reply

    Thanks for sharing. Cloud Document File is a storage service that uphold high levels of unstructured data or semi-structured data, such as documents, spreadsheets, presentations and other file-based data. To avail our service just have a look.

  9. Reply

    Excellent Article Ankur, I am just learning ICS and have a questions.
    I am calling supplier update service in fusion by reading data from a CSV file and using a for-each processing each record and calling the service. if for one of the record the API errros out I dont want to stop instead want to proceed with the execution of next record, Can you please suggest how do I design this type of exception handling.

  10. added on 31 Dec, 2018
    Reply

    Please drop scope activity under the for-each loop and call service in Scope. In case of any API fault for any record, loop will continue.

    Regards,
    Ankur

  11. added on 11 Jan, 2019
    Reply

    Nice blog, very interesting to read
    I have bookmarked this article page as i received good information from this.

    Best ERP Software in India | ERP Software Companies in India

    Cloud ERP Software in India | Low Price ERP Software in India

  12. added on 24 Jan, 2019
    Reply

    Excellent Blog. Thank you.

    Regards,
    Fazle Rub

  13. added on 28 Jan, 2019
    Reply

    This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Compress JPEG Images Online

  14. added on 27 Mar, 2019
    Reply

    Ankur, nice blog. Request your suggestion. We have a requirement to upload CSV data to ERP Cloud and automate it. I am reading the document: Using External Data Integration Services for Oracle ERP Cloud (Doc ID 2102800.1). If you have any ideas/insights or can explain this document will be helpful

  15. added on 12 Jul, 2019
    Reply

    Hi, ExpressTech Software Solutions is known as best custom Rest API Integration Services in India, USA, has the best in the industry specialization to deliver seamless API integration and development services. Our system integration services make sure that your web application or website is without flawlessly integrated with the standard or custom APIs. Contact us: contact@expresstechsoftwares.com

Leave a Reply

Your email address will not be published.