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;
p_items_per_page => 0);
COMMIT;
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)