8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Misc » Here

Comments for Oracle REST Data Services (ORDS) : Create Basic RESTful Web Services Using PL/SQL


Matthias Rogel said...

Hi Tim,

is there a typo in the page ?
Shouldn't it read
http://ol7-121.localdomain:8080/ords/pdb1/testuser1/testmodule3b/emp&empno_start=7876&empno_end=7934
instead of
http://ol7-121.localdomain:8080/ords/pdb1/testuser1/testmodule3b/emp/?empno_start=7876&empno_end=7934
?
Thanks
Matthias

Tim... said...

Hi.

No. That is correct. The endpoint is "emp/", then you are adding parameters to that.

Cheers

Tim...

Pierre said...

Hi Tim,
do you know how to hide null value in ORDS? Example if deptno is null, just want to hide it, else show it. the SQl/Json handle it with ABSENT ON NULL. The APEX_JSON.WRITE handle it too. Is there a way to make it using just ords?

{
"id": 1,
"ename": "pierre",
"deptno": null
}

Tim... said...

Hi.

Sorry. No idea. I guess you could ask on the ORDS forum. The developers answer questions there, so they should know if it's possible.

Cheers

Tim...

Pierre said...

Hi Tim,

do you know how to make a Post Request with a Image and others Parameters in the :body?

I use ords 17.4

Thanks

Pierre

Tim... said...

Hi.

You would probably have to base64 encode the image in the payload, and pass the whole payload as a blob, then parse it all out internally in your code.

Cheers

Tim...

Pierre said...

Hi Tim,

"parse it all out internally in your code. " Can you help me to do that? Never make it before.

The another alternativ is to set the Others Parameters in the Headers and we use the :body for the Image. Is it okay if we send Others Parameters im Headers and Image im :body?

We have many Parameters to set(about 50)


Thanks

Pierre

Tim... said...

Hi.

Send the whole JSON document (parameters and base64 encoded image) as a single BLOB parameter. Then use PL/SQL to parse it. There are examples of doing this here.

https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-restful-web-services-handling-complex-json-payloads

Cheers

Tim...

John said...

Fantastic and concise explanation of creating APIs with ORDS. Thanks Tim a million times over!!

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

If you post personal information (name, email address etc.) you are agreeing to them being stored and displayed. Feel free to remain anonymous.