0

-currently testing through Postman-

want a guide for this as:

  1. i do not want to expose the parameters and their values in URL.

  2. when using URI Template like myuri/:bindvar (single bind variable) then i can send parameters in Body.

  3. but when creating Handler's parameters ( multiple ) i can get successful message and update sending those through Parameter tab but i can't access successfully sending those parameters through Body, parameter values are null.

  4. the sample from oracle have 3 Templates contain bind variables in URI but all are have single bind variable.

thatjeffsmith
  • 20,522
  • 6
  • 37
  • 120
Oralover
  • 83
  • 2
  • 16
  • what's your template? this would work /ords/module/service1/:x/:y/:z – thatjeffsmith Nov 12 '20 at 17:47
  • thanks @thatjeffsmith, it is working fine as you have mentioned, but it needs to expose values in web URL and i do not want to add these. Is there any way I can hide so nobody can see those values I am passing to the service? – Oralover Nov 13 '20 at 04:35
  • in GET and POST methods i can submit values through Body tab (Postman) but can't for PUT... is there any limitation / requirement / mendatory for PUT method? – Oralover Nov 13 '20 at 05:23
  • Why can't you submit the values as json attributes in a PUT? – thatjeffsmith Nov 13 '20 at 10:15
  • @thatjeffsmith, sir i have no idea about it, will you please give an idea like: https://mysite/ords/basepath/uri and the values as json attributes... i will be much grateful. – Oralover Nov 14 '20 at 11:19
  • Update your question with your PUT implementation, and we'll help you fix it – thatjeffsmith Nov 14 '20 at 11:51
  • 1
    thanks @thatjeffsmith for your keen interest to help me. here is what I understand that I had a PUT method which contains 4 columns to update using an :id column, user can update password and/or email and the date to update is default for SYSDATE, now user should send all 3 columns to the PUT method that should update using a PL/SQL function which will return id, email, password and update date. id is to use in where clause to updae specific row. – Oralover Nov 14 '20 at 13:33
  • here you go @oralover https://www.thatjeffsmith.com/archive/2018/10/x-ords-forward-ords-response-forward-to-another-resource/ – thatjeffsmith Nov 16 '20 at 20:52

1 Answers1

0

You only need to supply the values you want to return as response

enter image description here

Otherwise, there's nothing special about coding a PUT handler in ORDS compared to a GET or POST - You just need to build up your PLSQL block to do the work, in this case an UPDATE, and then build out the response you want to send back to your REST API consumer.

Full example and code here

thatjeffsmith
  • 20,522
  • 6
  • 37
  • 120
  • 1
    thanks a lot @thatjeffsmith for your struggle to help us. and very sorry for my late response, simultneously i have assigned an another task to achieve... with kind regards – Oralover Nov 25 '20 at 05:55
  • it's no struggle @Oralover - it's an opportunity for us to share what can be achieved with the technology - good luck on your next task! – thatjeffsmith Nov 25 '20 at 16:43