2

I need a way to read/get data from a REST API to insert it into a table in Oracle DB. I've been searching for it but I've only found the opposite case.

I'm using PL/SQL Developer & Postman Do i need another software ?

Thanks.

2
  • Is the data in a JSON format? I would suggest starting with the UTL_HTTP package. Commented Dec 11, 2019 at 22:53
  • yes, it comes in JSON format Commented Dec 12, 2019 at 13:24

2 Answers 2

3

One way to go is with Oracle REST Data Services (ORDS).

It's a mid-tier Java application (or servlet with Tomcat/WebLogic) that takes HTTP(S) requests and marshalls that to the Oracle Database.

It handles GETs, PUTs, POSTs, & DELETEs so you can definitely use it to INSERT one or more rows to a TABLE. And it can do that via a SQL statement, or an existing PLSQL API.

I talk more about this here.

Here's a REST Service that let's you POST a new record to a TABLE, including a BLOB (file).

This technology is included with your Oracle Database license at no additional cost.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

3

If you want to use UTL_HTTP, you can do something as simple as an INSERT ... SELECT ...

INSERT INTO my_table(response_data)
  SELECT utl_http.request('http://service.url.com')
  FROM   dual;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.