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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error Message: Missing IN or OUT parameter at index ::1

Anil KuppaOct 4 2021

I've defined POST using the below PL/SQL block:

BEGIN
 ORDS.define_service(
  p_module_name  => 'rest-v1',
  p_base_path   => 'rest-v1/',
  p_pattern    => 'access_tokens/',
  p_method     => 'POST',
  p_source_type  => ORDS.source_type_plsql,
  p_source     => 'BEGIN
              insert into access_tokens(id)
              values(:_id);
             COMMIT;
             END;
              ',
  p_items_per_page => 0);

 COMMIT;
END;
/

I then used Postman to call the POST and below is the request body:

{
        "_id": "6156a22e57ca1a00110b842b"
    }

But, I'm getting 555 User Defined Resource Error




The request could not be processed because an error occurred whilst attempting to evaluate the SQL statement associated with this resource. Please check the SQL statement is correctly formed and executes without error. SQL Error Code: 17041, Error Message: Missing IN or OUT parameter at index:: 1

Any help on what I'm doing incorrect? I manually also wrote the SQL statement and it's working fine.
Below is the table description:

Name     Null? Type     
------------- ----- ------------ 
ID         VARCHAR2(40) 
ACCESS_TOKEN    VARCHAR2(40) 
CREATION_DATE    TIMESTAMP(6) 

Comments

Post Details

Added on Oct 4 2021
3 comments
2,145 views