REST api to fetch sonar.links.ci parameter

Hi,

This question is in ref to my previous question here.

I’m setting sonar.links.ci parameter for every project & want to fetch it via REST call.

Technically it should be available when I call /api/settings/values?component=[projectKey]&keys=sonar.links.ci (as suggested by Colin), but I’m not getting that in response.

Please suggest.

Thank You

Hello,

You can request project links using the /api/project_links/search WS (docs).

Regards,

1 Like

Stas,

Can I butt in with an enhancement request?

sonar.links.ci shows up in the response for GET api/settings/list_definitions (https://next.sonarqube.com/sonarqube/api/settings/list_definitions) but upon further research (which I admit I did not undertake when reccomending the GET api/settings/values API to Rahul), is not returned on a request like this: https://next.sonarqube.com/sonarqube/api/settings/values?projectKey=org.sonarsource.sonar-lits-plugin%3Alits

Removing sonar.links.x from GET api/settings/list_definitions might help users in the future. :slight_smile:

Colin

1 Like

Indeed it’s a bug, thanks for reporting it !
I’ve created a ticket to fix this : https://jira.sonarsource.com/browse/SONAR-11004

As reported by Stas, the web service api/project_links should be used instead.

3 Likes

Thank you all for your help :slight_smile: