I'm using SonarQube to detect duplication and want to use the api to find out for each block of duplication which components have that block. The api provides for getting the amount of duplication and which components have duplication. For example:
http://nemo.sonarqube.org/api/resources?resource=jquery&metrics=duplicated_blocks&depth=-1
This shows me which components have duplication and how many blocks. But I'd like to see which other components the components share duplication with. For example, I'd like to be able to retrieve information like this:
<duplicated_block>
<length>100</length>
<resource>
<id>323</id>
<key>org.my_org.project:component:org.my_org.project.comp.DateUtil</key>
<scope>FIL</scope>
<start_line>45</start_line>
</resource>
<resource>
<id>456</id>
<key>org.my_org.project:component:org.my_org.project.comp.DateTimeUtil</key>
<scope>FIL</scope>
<start_line>78</start_line>
</resource>
</duplicated_block>
Is it possible to get information like that from SonarQube via the api?
Since SQ 4.4, you have a WS to get this information: "/api/duplications".