World of API’s in Oracle Integration Cloud
We all have been using REST and SOAP API to get data out of Oracle ERP Cloud i.e SCM/FIN/HCM Cloud. Each of these API’s have different query parameters, different ways to filter, different notations. It’s always better to refer to docs of latest release to understand what’s supported by the API that we want to use. In this article we will see some of the tips and tricks that can be used with these REST API’s. Also we will share some experience that we encountered while using these API’s
In the REST API doc look for this section before making GET call to understand what features are supported by this GET calls.
Listing down some of the less popular query parameters that can be used.
- fields -When we make GET call Response payload has all the fields available as part of that entity. Sometimes this might cause payload size issue. If you are looking for only limited fields then its always better to mention those fields in the field query parameter.
Your URL can be modified as shown below to fetch only limited fields.
2. onlyData- Not so much of important , but when data is returned it will contain links about the referenced entities, lov’s etc. Using onlyData=true will return only data.
3. limit and offset- These parameters can be used for pagination or to reduced the payload size in order to fetch limited data. limit should be constant value, offset should start with 1 and increment it as currentOffset+limit in loop to fetch incremental data.
4. In one of the case there was the a need to filter data when the data parameter is null. We achieved it as below.
/fscmRestApi/resources/11.13.18.05/URI?q=DateAttribute IS NULL
or if you want to check if value is not null then you can use
/fscmRestApi/resources/11.13.18.05/installedBaseAssets?q=DfltWoTypeCode IS NOT NULL
5. As we have fields in REST API which dictates which fields to be returned in REST response, similarly in SOAP API’s if you want to get only limited fields, then you can do it using findAttribute as shown below
If you find some more tricks and hints like this then please do let me know, so that we can add your experience as well.