This blog was originally published on May 15, 2017.

More and more Application Express developers are faced with the requirement to integrate REST services or HTTP/JSON data feeds into their applications. Application Express provides great support for SOAP web services, but for REST services using JSON to exchange data, the built-in functionality is limited. For instance, all the JSON parsing has to be done manually by employing PL/SQL code or SQL functions.

Oracle Application Express contains the REST Client Assistant, packaged application which is there to help the developer in integrating REST services into their applications.

 

In the first part of the series (REST Services and Application Express 5.1 – Part 1) REST Client Assistant was introduced and it was shown how to use it to generate SQL und PL/SQL code and to integrate an external REST service into an APEX application and to display its data in an APEX report. Today we’re taking the next step: Typical REST services return their data not all at once (which would be problematic for larger data sets), but in pages. 

A REST service returning its data in pages can be created within only minutes: All you need is the Oracle Database (as an APEX developer this should not really be an issue) and Oracle REST Data Services (ORDS). With only two PL/SQL calls you create a REST interface for any table in your database schema. You can test this REST service using a browser, one of the many publicly available REST Client applications or you can explore it using the REST Client Assistant packaged application.

Our latest article shows not only how to access that REST service from an APEX application, but also how to implement pagination for the REST service – within your APEX application. Click a button on your APEX page, and have the application request the next page of REST data. Use this to walk through the complete result data of your REST service – back and forth.

Finally you’ll learn how REST Client Assistant can generate a table function for you which grabs the complete result set from the REST service – the function walks through all the pages automatically returning data from the REST service like rows from a local table. All code is generated for you – you can use it as-is or dive into it and extend it as you wish.

Read the full article