Hi,
Do you know if it is possible to create a ORACLE procedure to insert an issue into GitLab ?
I was thinking to do something like :
declare
l_json_clob clob;
l_json_response varchar2(15000);
l_wallet_loc_nopass varchar2(50) := ‘file:c:\oracle_wallet\WALLETS’;
l_gitlab_user varchar2(50) := ‘eric.sacramento’;
l_gitlab_pw varchar2(50) := ‘lkmasdpoadpaid’;
l_gitlab_api_create_issue varchar2(50) := ‘https://gitlab.com/api/v4/projects/4/issues/’;
begin
apex_web_service.g_request_headers(1).name := ‘Content-Type’;
apex_web_service.g_request_headers(1).Value := ‘application/json’;
l_json_clob := ‘{
“project_id” : 4,
“id” : 84,
“created_at” : “2019-02-07T12:44:33.959Z”,
“iid” : 14,
“title” : “Create Issue From API”,
“state” : “opened”,
“assignees” : ,
“assignee” : null,
“labels” : [
“bug”
]}’;
l_json_response := apex_web_service.make_rest_request
( p_url => l_gitlab_api_create_issue
, p_http_method => ‘POST’
, p_username => l_gitlab_user
, p_password => l_gitlab_pw
, p_body => l_json_clob
, p_wallet_path => l_wallet_loc_nopass);
end;
Thank you,
Eric