How to Fetch and Send Only Project-Specific Tags via SonarQube API

Hello SonarQube Community,

I am using SonarQube 10.7 Community Edition. I am working on SonarQube to send project-specific metrics, including coverage and complexity to Datadog. I have developed a python script for this and working fine. While fetching tags using the SonarQube API, I noticed that all available tags across all projects are being returned, instead of only the tags assigned to the specific project.

Here’s what I have tried so far:

  1. I used the /api/project_tags/list endpoint, but it seems to fetch all available tags in the system.
    2.I also tried /api/projects/show, but the tags field does not seem to be included in the response.

My goal is to:
Fetch only the tags assigned to a specific project. Use those tags while sending metrics for that project to Datadog.

Here are my question, Is there a specific API endpoint that returns only the tags associated with a specific project? If not, is there a workaround or best practice for achieving this?

Any guidance or recommendations would be highly appreciated.

Thank you in advance!

Hey there.

Checkout GET api/components/show

Thank You!!
.
It’s Working. Now i am able to get active tags to datadog

1 Like