To insert bulk records into an Oracle table using Oracle APEX REST API
To insert bulk records into an Oracle table using Oracle APEX REST API
import requests
import json
# Sample data
records = [
print(response.text)
Parse the JSON payload in the POST handler to extract the list of records.
Loop through the records and insert them into the Oracle table using SQL
or PL/SQL.
You
write oracle apex code with reference to above code to insert record in oracle table
ChatGPT
ChatGPT
To insert records into an Oracle table using an Oracle APEX RESTful Web Service, you
can follow these steps:
Edit the POST handler and write PL/SQL code to handle the POST request.
Here's an example:
DECLARE
l_records APEX_JSON.t_values;
l_record APEX_JSON.t_value;
BEGIN
APEX_JSON.parse(l_records, l_data);
p0 => i);
VALUES (l_record.get('id').get_number,
l_record.get('name').get_vc2);
END LOOP;
COMMIT;
HTP_RESPONSE_STATUS(200);
EXCEPTION
HTP_RESPONSE_STATUS(500);
END;
Note: Ensure that you replace your_table_name with the actual name of your Oracle
table.