Thursday, October 12, 2017

#599 APIP CS Analytics/Monitoring and custom logging

Monitoring of APIs is a very important feature of Oracle's API Platform Cloud Service.
We can do so at three levels -

1. Management UI

2. APIP CS REST API

3. Gateway logs


So, as usual, here is a simple example to get us going.





















As you can see, the API leverages the new APIP CS Service feature, which essentially
virtualises the backend endpoint.

Here is the Service Definition for my backend Bank Balance service -




The service is essentially a SOA Composite running on my laptop.

Anyway, back to monitoring -

I deploy the API to my Gateway and execute some tests via Postman.

My first test doesn't include the required app-key, so it gets rejected.


I now add the app key and re-test - and see the response I expect



I now execute some more requests so as to hit the throttling threshold -

Analytics via Management Portal UI 

Let's drill into the Errors & Rejections -


Now let's look at retrieving the same via the REST API.

Analytics via APIP CS REST API

Here I look for all rejections -

Again, I test using Postman -




Nice stuff!

Analytics via APIP CS Gateway logs

I find my Gateway log files here - 

/out/domains/gateway1/apics/analytics/logs


I check out the most recent logfile -


Now to the final piece -

the Response definition of the API is as follows -


As you ca see, I have included a Logging Policy -
Here I attempt to log the customer account number, returned by the backend service.




As you can see, the default custom logfile is called apipcs.log.

I find that logfile here - /out/domains/gateway1/apics/customlogs


so it failed to find the accoountNr, now what a surprise.
I now go back to the API definition and amend the Log policy accordingly.




Monday, October 2, 2017

#598 Oracle Unveils Oracle PaaS and IaaS Universal Credits

read all about it here

The actual service descriptions are available here


Thursday, September 21, 2017

#597 Quick look at the ICS JDE adapter




Here is the adapter configuration -

























Here is it in use as an INVOKE -
































Wednesday, September 20, 2017

#596 ICS Fusion ERP adapter in action



File-based Data Import (FBDI): Import Journal Entries into Oracle Financials with ICS, 
incl. processing the Callback.

In this simple example we will do the following -

1. pick up a zipped file from an ftp server
2. unzip the file. It will contain many files
3. For each file -
3.1. Read the records in the file
3.1.1. For each record -
3.1.1.1. Transform and write to the output file
3.2. Upload the file to Fusion ERP - invoke the ERP Import Service.



Create the connections in ICS

Create the Fusion ERP Connection
















































Create and test the FTP connection













Create the ICS Orchestration























Drop in the ftp adapter -





























































I can delete the Map to DownloadZipfile
















I now need to unzip the file -

I use the STAGE FILE ACTION for this -





























I will then need to configure the following -

























I do so as follows -























Note: I have hardcoded the Unzip directory
















My Orchestration now looks as follows -



























In my scenario, the zip contains only 1 file for processing -

So now we start processing the records in the file.

I will start by listing the contents -

Again, I use the STAGE FILE ACTION -



















My Orchestration now looks like this -

































Now to the actual file processing...

I add a FOR EACH ACTION to iterate thru the files.











































I configure the above as follows -















The Orchestration now -



























Now we add yet another STAGE FILE ACTION -

This will be used to Read the file.
























































I have a test .csv to use here -




























The Orchestration now -



























I now add yet another STAGE FILE ACTION to write the output file -

































































Now to the mapping...






















I create the following 2 mappings -
















All we now need to do is zip up the output file.
We do this again via the STAGE FILE ACTION -


























The Orchestration now...

































Now we will invoke the Fusion ERP Import Service -





























































The Orchestration now...




























Now to the Mapping...























I now add a NOTIFICATION ACTION to send the confirmation code






























































































I now create the Callback ICS process - this will be called on the successful completion of the ERP import.




























Drag and Drop the ERP adapter connection






























Add a NOTIFICATION ACTION -













































Ensure the certificate for the ERP Cloud instance is imported into the ICS certificate store.
















I activate the callback integration.

I copy the Identifier -













I now edit the main Orchestration again, leveraging the callback integration -




























I now activate this orchestration


I then test via menu - submit now