Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to delete/update records when a table is rest enabled

User_CDX3FApr 6 2020 — edited Apr 8 2020

I enabled a schema to use Oracle Rest Services  using SQL developer tool. I installed the service as a standalone in my pc by connecting to a remote database. I also rest enabled  a table for testing purpose. Now I accessed the table data using a get request from browser and able to see the records in the browser in JSON format. I am now trying to delete a record using curl or postman. I am unable to do so.

Delete request using ppostman:

http://localhost:8080/ords/mydatabase/table1/?q={"pid":1}

Where mydatabase is the schema name and table1 is the name of the table. This table has pid as a primary key column. I am able to list all the records by giving the below url(http://localhost:8080/ords/mydatabase/table1), but unable to update or delete a record. What is the syntax to follow or is there a special steps that I need to do in the database like write a stored procedure or some thing similar.

Also, what should i do when i want to delete based on multiple column value like delete from table where pid=1 and pid2=100...

Thanks.

This post has been answered by thatJeffSmith-Oracle on Apr 7 2020
Jump to Answer
Comments
Post Details
Added on Apr 6 2020
8 comments
828 views