1

I have my custom metrics and I would like to create my own custom project in SonarQube and push all my custom metrics to Sonar DB via Rest API's.

Also I would like to create a specific user and provide permission only to the custom project.

Please share the steps to achieve it.

slartidan
  • 20,403
  • 15
  • 83
  • 131
Saran
  • 31
  • 4
  • I'm trying in Java. DefaultHttpClient httpclient = new DefaultHttpClient(); HttpHost target = new HttpHost("localhost", 9000, "http"); String url = "/api/projects/create"; HttpPost objPost = new HttpPost(url); ArrayList postParameters; postParameters = new ArrayList(); postParameters.add(new BasicNameValuePair("name", "customproj2")); postParameters.add(new BasicNameValuePair("key", "customproj2")); objPost.setEntity(new UrlEncodedFormEntity(postParameters)); HttpResponse httpResponse2 = httpclient.execute(target, objPost); – Saran Mar 29 '16 at 05:13
  • With the help of the above code, I'm able to add new project in the sonar database. But the new project name is not reflecting in the sonar home page. – Saran Mar 30 '16 at 11:34
  • To bring the name with related metrics in the sonar home page or dashboard, what are all table I have to update further.? – Saran Mar 30 '16 at 11:35

0 Answers0