1

I'm trying to create a RESTFUll API endpoint with ORACLE APEX using the PUT method (UPDATE) where i need to update the value of a column in a specific row, but when i try to test the method in POSTMAN it returns STATUS 555 USER DEFINED RESOURSE ERROR, and if i try to use the url directly into browser, it returns error 405 METHOD NOT ALLOWED. I'm trying this way:

enter image description here

Does anyone know why it`s not working correctly?

1 Answer 1

1

Have you tested that pl/sql block ? I see 2 errors. That could explain the 555 error

BEGIN
  update usu_int_foods
     set email = :email -- missing equal sign
   where cod_cracha = :id; -- missing semi colon
END;

In addition to that, what payload did you pass in POSTMAN ? Your code references a bind variable :email but you do not references that anywhere or mention how you pass that value in the call.

Also, accessing a PUT rest endpoint in a browser will never work (more info here)

Best place to start with restful webservices is read Jeff Smith's very complete posts or Tim Hall's

1
  • This is 100% correct, nice answer Koen! Commented Aug 24, 2022 at 17:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.