4

Am trying to get the data from JIRA REST API using WPS. I was using the HTTP PROC to call JIRA rest api.

proc http 
method="GET"
url="http://servername:8080/rest/api/2/search?%str(&)fields=project,status%str(&)jql=project=C12395"
webusername="username" 
webpassword="password" 
ct="application/JSON"
out=resp;
run;

Am getting error/response code as 400.

NOTE: Call to [http://servername:8080/rest/api/2/search?&fields=project,
      status&jql=project=C12395] returned [400]
NOTE: Procedure http step took :
      real time : 0.628
      cpu time  : 0.031

Am really not sure what am missing. Same JIRA REST API URL working in JAVA.

Note: WPS version is 3.2

Thanks! Bharathi

Richard
  • 25,390
  • 3
  • 25
  • 38
Bharathiraja S
  • 679
  • 4
  • 12
  • 26
  • What version of SAS? – Robert Penridge Aug 24 '18 at 17:52
  • SAS 9.2 Version – Bharathiraja S Sep 14 '18 at 08:57
  • The 400 Bad Request Error is an HTTP response status code that indicates that the server was unable to process the request sent by the client due to invalid syntax. It looks like you may have an extranneous `&` immediately after the `?`. Perhaps this is throwing it off... perhaps not. Also try simplifying it for the moment and using single quotes so you can eliminate quoting as a cause for concern: `'http://servername:8080/rest/api/2/search?fields=project,status&jql=project=C12395'` – Robert Penridge Sep 14 '18 at 13:54
  • i will try it too :) – Wired604 Sep 20 '18 at 15:00

0 Answers0