cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PO 7.5 SFTP to REST Receiver Adapter - calling multiple REST APIs

0 Kudos

Hello Experts,

My scenario is SFTP sender to REST receiver. On sender side, PI will receive a CSV file. This file will contain data to be used on REST receiver side for calling REST APIs.

Following are the steps on REST receiver side:

STEP 1: REST Adapter needs to make a call to the first REST API for authentication using OAUTH2 grant flow (password) type and receive an authorization Token.

STEP2: The Authorization token received from step 1 along with the payload in tab delimited format (CSV data from SFTP adapter needs to be converted to TAB DELIMITED payload format for REST reveiver) needs to be sent to a second REST API using PUT operation for creation of a task on target. Target will send a reference id (IMPORT_ID) as a response to PI in JSON format (So request of REST API will be in tab delimited format while the response will be in JSON format)

STEP 3: The IMPORT_ID sent to PI as a response in step 2, needs to be again sent to second API (API URL is same as STEP 2) using GET/IMPORT_ID operation. In response, PI will receive a JSON reponse containing the status (Successful or Fail).

So my scenario is to make multiple calls on REST Receiver adapter side.

So in relation to above scenario, Can you please resolve my following Query:

1. How can I transform incoming CSV format (from sender SFTP adapter) to outgoing REST receiver adapter. Would I require to convert first CSV to XML on sender side and then from XML to tab delimited on REST receiver side.

2. How can i manage the multiple API calls on REST receiver side? Do I need to achieve this using BPM or is it possible to achive this without BPM. Please suggest.

Thanks in advance,

Anurag

Accepted Solutions (0)

Answers (0)