ORDS (Oracle REST Data Services) REST is using POST for its INSERT SQL commands. You can setup ORDS POST insert quickly with these default settings.

The Setup
POST insert has a different configuration from GET. These are some of the settings to take note.
- The source type must be PL/SQL.
- Remember to set mime types to application/json.
- It is important that you setup a PK (primary key) for the table to be inserted.
Reference source: ORDS POST Insert
Common Errors during Testing
You can use tools like Postman to do your API testing. These are the errors that will cause the API to fail.
- Content-Type must be set to application/json.
- Body format must be set to JSON.
- Charset must be set to UTF-8.
- Custom parameters name to exclude dash.
- Missing PK in table.
- Check your typos in the JSON payload.
- Check your typos in PL/SQL.
ORDS POST insert will be easy to setup. However, you need to take note of the common errors. Hope this will help you to save several man hours in finding the issue.
3 thoughts on “ORDS REST POST Insert”