Creating projects with SonarQube web api - sonarqube

Im trying to create a project with SonarQube web api, I can't find any good tutorial to create them.
I need to analyze a code and then get the information that SonarQube provides, I need to automatize all of this in a web application.
Is this possible to do with SonarQube web api?

The latest SonarQube versions have an api-documentation link. For SonarCloud you can find the documentation here. The documentation to create a new project is here. If you look at the details of api/projects/create you can see the parameters needed, the changelog and a response example. This API is available since version 4.0.

Related

Looking for an option on Artifactory Pro to create a dashboard for Download Metrics

We are looking for an option in Artifactory Pro edition, where want to make a central dashboard for downloaded artifacts. Currently the each artifacts has count for # of downloads but we want to extend it more -
Number of downloads
Who downloaded it
from where its downloaded
Dashboard with filter criteria. Please help if anybody has build this type capability. I know probably we can use a plugin for this getting metrics and storing it to somewhere else. But we are looking for option provided by JFrog Artifactory.
Package view is part of the Platform versions (Artifactory 7.x and above): https://www.jfrog.com/confluence/display/JFROG/Package+Management
I suggest you upgrade as this is pretty much what you need.
On your current version there isn't such dashboard, but you can gather the information easily using the Artifactory Query Language: https://www.jfrog.com/confluence/display/JFROG/Artifactory+Query+Languagea
There is no metrics dashboard provided by Jfrog out of the box that would fit this need.
As mentioned by Angello you need to scrape the metrics yourself using the AQL or using different APIs provided by Jfrog then use that data to post onto a dashboard custom made for your usecase.

Sonar analysis & report publishing permissions

Is it possible to restrict the publishing of new analysis on a sonar instance. My use case is I created new instance of sonar with the latest version. There are couple of projects configured with the old version. I want to make sure that no project team use old instance of sonar. At server level, is it possible to stop publishing new report.
Also what customization options sonar server gives for its home page. I want to display a custom message with Sonar 5.6 version
Atul
You seem to have stood up two different instances of SonarQube side by side. In doing so, you impose on your teams the requirement to update their CI configuration to point to the new instance.
You should instead replace the old version with the new one. See the Upgrading docs for details.

SonarQube Web-API - api/resources not returning all projects

I use the following url to extract a number of metrics for each of the projects we have in SonarQube:
/api/resources?metrics=lines,ncloc,reliability_rating, ...
But, it is missing data for (at least) one of the projects. But if I use the following:
/api/resources?resource=69644
It will pull the data for the project. What would cause the project to not show up in the first use case?
We are currently on SonarQube 5.6.
I'm going to answer my own question...
Turns out this particular endpoint has a hard coded limit of 500 components. Which is a known issue and will not be fixed and the endpoint has been deprecated.
To get the same functionality I've switched to using api/projects/index to get the list of projects and then use api/measures/component for each project I'm interested in getting metrics for.

how to get elastic search java api 5.0 detail changes log from es2.3.4

elastic search have publish lastest java api ,After much search,i failed to find the detail changes log.
I have got a open-source elastic-helper code to synchronize mysql with es.when i used the lastest java api(elasticsearch-5.0.1.jar),i got a lot of error because of the changes of API.
I want to find useful document to refer to.

Running a Sonar Analysis from the Dashboard

Is there a way to run a Sonar 5.1.1 Analysis completely in the Dashboard GUI?
If not what are the steps to run it otherwise? I can't seem to find a document that walks you through the steps.
The Sonar Server / Dashboard / GUI is just used to display data, not to collect data (this old blog post explains the sonar architecture).
To collect data you can use maven, gradle, ant or sonar-runner for other projects. The documentation that guides you is in ... the sonar documentation :) - see the child pages, as they explain the details of how to configure the technologies I mentioned above.
I suggest you to also have a read at the configuration parameters you can pass, as the docs are not super clear about them.

Resources