Api for accessing rule details from sonar server

Hi,

We are using below sonar service to retrieve rule specific details like rule id, name,
severity, category ,description etc. to access rule information

https://localhost:8080/ccap/api/rules/search?p=1&ps=200&facets=languages%2Ctypes&f=name%2Clang%2ClangName%2CsysTags%2Ctags%2Cstatus%2Cseverity%2CisTemplate%2CtemplateKey%2ChtmlDesc&s=name&asc=true&languages=java

We want technical debt info as well specific to each rule

Could you please share the url using which we can retrieve all details.

Regards
Bhavi

Hi Bhavi,

Welcome to the community!

I guess you formulated your URL based on what’s used in the UI? If so, bravo; that’s a great start. And you can go further by consulting the Web API link in the SonarQube page footer to see the onboard documentation for the web services.

Since I’m somewhat familiar with those docs, I’m aware that some of the keys in your query string describe which fields and which metadata to return. So in a quick experiment, I chopped out everything between &ps=200 and &languages=java and got a lot more data than before.

 
HTH,
Ann

can u plz share the url u tried?

I need specifically technical debt,please share url for same

Hi,

Can someone please suggest api to fetch technical details from sonar server?

Regards
Bhavi