13.7.6 Creating a Custom REST Source Plug-in
If you work with REST APIs that follow a set of conventions APEX doesn't support natively, create a custom REST Data Source plug-in.
This kind of extension adds a new REST Data Source type to the list in the Create REST Data Source wizard. By choosing your new kind of data source, your teammates can automatically benefit from all the declarative smarts you build into it.
Creating a REST Data Source plug-in requires writing PL/SQL code that implements one or more contract procedures the APEX engine defines. The high-level contracts this type of plug-in can implement are:
Table 13-4 REST Data Source Plug-in Contract
| Procedure | Purpose |
|---|---|
| Capabilities | Defines if server-side filtering, sorting, and pagination are supported |
| Discover | Determine operations, parameters, and data profile columns based on custom service metadata |
| Fetch | Retrieve data with optional support for server-side filtering, sorting, and pagination |
| DML | Save changes implied by DML rows from form, grid, or APEX_EXEC |
| Execute | Handle the Invoke API or EXECUTE_REST_SOURCE use case
|
You can find a basic, working example of a REST Source plug-in to study and experiment with on the Oracle APEX GitHub repository. After choosing the APEX release you're using, see the plugins/rest-source subdirectory. It implements the Capabilities, Discover, and Fetch contracts.
Parent topic: Additional REST Data Source Features