14.7 Controlling REST API Behavior Completely
For complete control over your ORDS REST APIs, create a full set of PL/SQL handlers.
Tip:
Your module templates can mix Collection Query and Collection Item GET handlers with PL/SQL handlers for POST, PUT, and DELETE operations. However, the /v1 and /v2 modules show how to manage even the GET handlers using custom PL/SQL when that level of flexibility might be useful to your application.
- Providing Complete Set of ORDS Handlers
Understand the full set of operations your REST API can implement for maximum control. - Using Handler Bind Variables
Use handler bind variables to read URL values, request bodies, parameters, and headers. - Keeping PL/SQL Handlers Maintainable
Keep ORDS PL/SQL handlers small by delegating REST logic to package procedures. - Defining Explicit Handler Parameters
Define explicit handler parameters for request headers, query strings, and other inputs. - Reusing Common REST API Handler Code
Reuse common REST handler code to send JSON responses, errors, and optional debug details. - Reading and Writing Binary Content
Read binary content with a Media Resource handler and store uploads using the:bodybind variable.
Parent topic: Exposing APIs for Integration