Create and test APEX_COLLECTION from SQL Developer/TOAD without log in to Application
Please refer below sample code to create and test apex_collection using SQL Developer.
l_security_group_id NUMBER;
l_val VARCHAR2(4000);
v_arr wwv_flow_global.vc_arr2
BEGIN
-- Find Security Group ID
l_security_group_id : = apex_util.find_security_group_id('&WORSPACE_NAME');
-- Set Workspace ID
apex_util.set_security_group_id(v_workspace_id);
-- Set Application ID
apex_application.g_flow_id := &APP_ID;
-- Set Session ID
apex_application.g_instance := &APP_SESSION;
apex_collection.create_collection('XXTEST');
v_arr(1) = 'Testing 1 2 3';
apex_collection.add_members('XXTEST', p_c001 => v_arr);
SELECT UPPER(c001)
INTO l_val
FROM apex_collections ac
WHERE ac.seq_id = 1;
DBMS_OUTPUT.put_line(l_val);
END;