Return HTTP code 404


I am using Jira 7.13.0 and Jira base URL is

String urlCAL="["+issue](;


String authString = "vpsvalidator:8c5ydjGL0S8ZiZsODG2JetNqn";
String authStringEnc = Base64.getEncoder().encodeToString(authString.getBytes("utf-8"));
URL url = new URL(urlCAL);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("Accept", "application/json");
conn.setRequestProperty("Authorization", "Basic " + authStringEnc);
if (conn.getResponseCode() != 200)
throw new RuntimeException("Failed : HTTP error code : "+ conn.getResponseCode());
BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));
String output =;
Pattern folderpattern = Pattern.compile("\"id\":(.+?),\"name\":\"(.+?)\",\"attachments\":(.+?)]") ;
Matcher foldermatch = folderpattern.matcher(output);
message1 = message1+ output;
String attachmentsID =;
String attachmentsFolders =;
String attachmentsDetails =;
String folderFiles1 =attachmentsDetails.replace("{","");
String folderFiles2 =folderFiles1.replace("[","");
String folderFiles3 =folderFiles2.replaceAll("\"","");
folderFiles =folderFiles3.replace("ids:","");
message1= message1+folderFiles;
catch (Exception e)
throw new InvalidInputException(e+"Unable to Find the Selected folder"+message1+"---"+folderFiles+"==="+requiredValue);

then Error shows the HTTP error code: 404 not found.
Does anyone help me?

Smart Attachments 2.X no longer supports REST API, only Java API. Please drop an email at with description of what you want to do.

Sincerely, Vadim

In your URL - you need to replace /rest/attach-cat/2/attachments/get
with rest/attach-cat/1.0/attachments/get.
This should help.

Sincerely, Vadim

Hi vrutkevich,

 Thank you for replying. and I have already tried both versions such as /rest/attach-cat/2/attachments/get  and /rest/attach-cat/1.0/attachments/get but still same error is occurred.