Configuring ORDS Handlers for 26ai API
Set up ORDS handlers to call an alternate API that uses 26ai JSON type and a duality view.
The v2 module has the same template and handlers as the v1 module. However, its handlers use 26ai JSON type and Duality Views to simplify the implementation. The diagram shows the module, its templates, and their handlers using the segment of the REST API URL they contribute. The v2 module has an /actionitems template with GET and POST handlers. Its /actionitems/:id template has GET, PUT, and DELETE handlers.

Description of the illustration ords-v2-handlers.png
Similar to the v1 module handlers, each v2 handler shown below calls the indicated procedure in the ACTION_ITEMS_DV_API_REST package:
-
GET/v2/actionitems→get_objects -
GET/v2/actionitems/:id→get_object -
POST/v2/actionitems→insert_object -
PUT/v2/actionitems/:id→update_object -
DELETE/v2/actionitems/:id→delete_object

Description of the illustration ords-handlers-call-plsql-dv-api-rest-pkg.png
The ACTION_ITEMS_DV_API_REST accepts the CLOB JSON payload and constructs a JSON type to pass to the main ACTION_ITEMS_DV_API package. The diagram below shows the similar package layering the v1 module uses.
The figure illustrates a package dependency diagram showing:
-
ACTION_ITEMS_DV_API_RESTuses-
ACTION_ITEMS_APIfor logic -
APP_COMMON_RESTas a REST services helper
-
-
ACTION_ITEMS_DV_APIuses-
ACTION_ITEMS_COMMONfor validation -
APP_COMMONfor error handling
-
-
ACTION_ITEMS_COMMONalso usesAPP_COMMONfor error handling
In addition, the diagram shows that the Action Items edit page uses the same packages:
-
ACTION_ITEMS_COMMONfor validation -
APP_COMMONfor error handling

Description of the illustration 23ai-action-items-rest-api.png