0% found this document useful (0 votes)
1 views9 pages

Rest API extract in oracle fusion

The document outlines a process for extracting invoice numbers and currency from Oracle Fusion using REST APIs. It details the necessary parameters for the API request, the structure of the response, and the steps to build an OIC integration that retrieves the data and sends it as an email attachment. The integration involves looping through the API responses until all data is extracted and includes testing instructions to ensure successful execution.

Uploaded by

ravi84singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views9 pages

Rest API extract in oracle fusion

The document outlines a process for extracting invoice numbers and currency from Oracle Fusion using REST APIs. It details the necessary parameters for the API request, the structure of the response, and the steps to build an OIC integration that retrieves the data and sends it as an email attachment. The integration involves looping through the API responses until all data is extracted and includes testing instructions to ensure successful execution.

Uploaded by

ravi84singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Requirement

Extraction of all Invoice numbers and Currency from Oracle Fusion.

Analysis

1. As we need to extract full data we need to use the approach explained earlier in the solution
section by using offset and limit and loop until hasMore attribute value in the response is false.

2. As the requirement is to extract only 2 fields we will make use of the fields parameter as
explained earlier in the REST API Parameters section. We need to pass the
“InvoiceNumber,InvoiceCurrency” value in the fields parameter in REST API so that in response
only these two fields will be extracted.

3. There is no need to use any data from links of child response so we need to restrict extraction of
it in response. For this, we need to use onlyData. We need to pass the “true” value
in onlyData parameter.

4. There is no need to use any data from links of items response so we need to restrict extraction of
it in response. For this, we need to use links. We need to pass the “self” value in the links
parameter so that only links with the relationship of self are extracted.

Sample REST Request:

Request URL: https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/latest/invoices?


fields=InvoiceNumber,InvoiceCurrency&onlyData=true&links=self&limit=1&offset=0

Operation: GET

Response

"items": [

"InvoiceNumber": "test23",

"InvoiceCurrency": "USD"

],

"count": 1,

"hasMore": true,
"limit": 1,

"offset": 0,

"links": [

"rel": "self",

"href": "https://servername.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/
invoices",

"name": "invoices",

"kind": "collection"

In the above response, we can see only 1 record because the limit =1 and we can see only 2 attributes
(InvoiceNumber, InvoiceCurrency) because we passed fields =InvoiceNumber,InvoiceCurrency, and we
can see limited payload because we used onlyData=true & links=self

Now, let’s start building the OIC integration with the above REST API by using the required parameters
and create the data file and send as an email attachment.

OIC Integration

1. Create a new Scheduled Orchestration style integration. I have named as InvoiceExtract.

2. Declare all necessary variables using Assign activity as shown below. I have taken the limit
as 200 so each REST request will not contain more than 200 records response.
3. To store the response of REST API, we need to have to stage write action as shown below and
hardcode the column headers. Here we have created a file with 2 fields as we need to extract
only 2 fields (Invoice Number and Invoice Currency

4. We need to call the REST API in the loop so we need to declare a while with exit condition
(hasMore!=’false’) as shown in the following image:
5. Inside the loop we need to call the Invoice REST API, So define REST connection as shown below
by adding REST parameters and defining sample response payload (use sample response payload
from above code section)
6. Map the REST request mapper as shown in the following screenshot.
7. Then use a stage write action to store the response as shown below by appending it to the file
created in step 3

8. Before the end of the loop increase the limit by 200 and assign hasMore variable value from the
REST response.

9. After the loop drop a Notify activity and assign the stage file reference in attachments.
10. Finally, the integration will look as shown below

Testing

1. Activate the integrations once all the configuration is completed.

2. Click on the Run icon and then click on Submit Now.

3. The integration will start running and check the integration execution details in the activity
stream.

4. Once the integration completes an email will be sent with an attachment that contains the
output file as shown below.
So we have successfully created and tested an integration that extracts data from Oracle Fusion using
REST APIs.

You might also like