Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 1

create issue using oracle - Validation Failed

Hi, 

 

Do you known what I am doing wrong ?

 

Thank you,

 

Eric

declare
l_json_clob clob;
l_json_response varchar2(15000);
l_apex_user varchar2(50) := 'ericyuri';
l_apex_pw varchar2(50) := 'my_password';
l_api_create_issue varchar2(100) := 'https://api.github.com/repos/ericyuri/Oracle/issues';
begin
apex_web_service.g_request_headers(1).name := 'User-Agent';
apex_web_service.g_request_headers(1).Value := 'application/json';

l_json_clob := '{
"title": "Found a bug",
"body": "Im having a problem with this.",
"assignees": [
"octocat"
],
"milestone": 1,
"labels": [
"bug"
]
}';
l_json_response := apex_web_service.make_rest_request ( p_url => l_api_create_issue , p_http_method => 'POST' , p_username => l_apex_user , p_password => l_apex_pw , p_body => l_json_clob , p_wallet_path => null ); dbms_output.put_line(l_json_response); end;

 

result

{"message":"Validation Failed","errors":[{"value":1,"resource":"Issue","field":"milestone","code":"invalid"}],"documentation_url":"https://developer.github.com/v3/issues/#create-an-issue"}

Statement processed.