14.6 Enforcing Business Logic in REST APIs
Apply the same business rules to REST API changes that your APEX pages use.
If you let an outside system change your application data, you must apply the same validation and defaulting business logic used in your web user interface to keep bad data out of your system of record.
- Reviewing Rules for Data Changes
Review the defaulting and validation rules the example app enforces for action item teams. - Defining Text Messages for Errors
Define Text Messages for translatable errors your pages and PL/SQL can share. - Using Text Messages in Pages and PL/SQL
Use Text Message substitution syntax in pages andAPEX_LANG.GET_MESSAGEin PL/SQL. - Handling Errors in a Common Way
Centralize error lookup, reporting, and logging so pages and APIs handle errors consistently. - Coding Business Rules for Reuse
Put shared business rules in a package so APEX pages and REST APIs can reuse the same logic. - Experiencing Validation Failure in UI
Show validation failures in the UI using the same shared business logic your REST APIs use. - Receiving Validation Error in REST API
REST API clients see the same validation errors that end users see in the app.
Parent topic: Exposing APIs for Integration