Quality Profile of Project

Hello…
thanks un advance, could someone please help me to get the specific Quality Profiles of a Project… i use the web api but doesn´t seems to be the right answer.

…/api/qualityprofiles/search?qualityProfile?&projectKey=NAME_OF_PROJ

thanks again…

Hi,

There’s not a targeted way to get this. It’s going to be messy:

You’ll need to start by looking at the default profile for each language (api/qualityprofiles/search?defaults=true). That gets you a profile per language. Then look at all the other profiles, and for each one, pull the list of projects explicitly associated to it (api/qualityprofiles/projects) to see if the default profile is overridden for that language.

 
HTH,
Ann

Thanks Ann …
I’ve also had this idea … I tell you: download the assigned profiles with: api/qualityprofiles/search?&project=NAME_PROJECT … which gives me all the profiles assigned to the project even by default, and not used in analysis.
Next step: when downloading the issues take the language of the issue and cross them with the language of the profiles, which would give me the profile applied in the analysis.

That reminds me of this question:
This gives me one language: …api/qualityprofiles/search?&language=c%2b%2b&project=NAME_PROJECT
This gives all: …api/qualityprofiles/search?&project=NAME_PROJECT
Is there any way to get two or n languages ​​in this api-get?

Thanks again…

Hi,

Nice! I missed that.

You run the tiny risk of missing a profile when there are no issues for a language. :smile:

Sorry, I don’t understand the question.

 
Ann

Hi Ann…
i don´t care about the risk of missing a profile if there are no issues … because, i only want just the profiles in use… in other words the profiles of the issues…

About the last question…
…api/qualityprofiles/search?&language=c%2b%2b&project=NAME_PROJECT
this return only the profile used in this project (NAME_PROJECT) for this language c++ (c%2b%2b)

and…
…api/qualityprofiles/search?&project=NAME_PROJECT
this return all the profiles for this nproject…all languages…

my question is: there is a way to get 2 or maybe 3 profiles… for ona project… something like this:
…api/qualityprofiles/search?&language=c%2b%2b&language=cs&project=NAME_PROJECT
for c++ and c#

for being there and take the time to help …

thanks,

Hi,

It looks like the language parameter is singular. Sorry, but this is just not a use case we’ve ever put any effort toward.

 
Ann