Rest API - get git repository name of sonar project

Hi,

How can I get the git repository name of sonar project? (by sonar key)

Thanks!

Version: 8.9.7

Welcome :slight_smile:

if this property is set for your project use api/project_links/search

List links of a project.
The ‘projectId’ or ‘projectKey’ must be provided.
Requires one of the following permissions:

  • ‘Administer System’
  • ‘Administer’ rights on the specified project
  • ‘Browse’ on the specified project

see http(s)://yoursonarhost/web_api/api/project_links for builtin web api docs.

Gilbert

Seems that the kinks are not used in our system, returns empty list :frowning:

Thanks any way

Likely, as those properties are not mandatory.
see Analysis Parameters | SonarQube Docs => sonar.links.*

1 Like