ORDS REST POST Insert

1–2 minutes

To read

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 responses

  1. REST in Peace – Danny Kwok Avatar

    […] Recently, we are exploring a lot of REST API. Although REST is quick and simple, there are challenges to take note while using it. This is because we are used to field types such as date. There are also things to take note while handling the different REST methods like GET or POST. […]

    Like

  2. Troubleshooting APEX REST Synchronisation – Danny Kwok Avatar

    […] for a two way data transfer between your local table and target table. One method is to direct REST POST to your target table and let APEX auto synch to your local table. Another method is to separate […]

    Like

  3. PUT to REST – Danny Kwok Avatar

    […] standard REST methods in ORDS (Oracle REST Data Services) are GET, POST, PUT and DELETE. We usually started testing REST with GET because it is usually the easiest for […]

    Like

Leave a reply to Troubleshooting APEX REST Synchronisation – Danny Kwok Cancel reply

Ama Ndlovu explores the connections of culture, ecology, and imagination.

Her work combines ancestral knowledge with visions of the planetary future, examining how Black perspectives can transform how we see our world and what lies ahead.