Getting a list of rules for a given Quality Profile

Hi :wave:t3:
Using Sonar 8.9.6 here and I need help (yeah, I know it’s old but we are in the medical device sector and we don’t get to update things as often as we’d like because compliance with the FDA and the like)

I’ve queried the API to get the list of Quality Profiles and I got a JSON with them.
API: https://sonar.mydomain.com/api/qualitygates/list
Partial result:

...
{
"id": "AXVBOYzFwAiWnCgREqwH",
"name": "Sonar way",
"isDefault": false,
"isBuiltIn": true,
"actions": {
"rename": false,
"setAsDefault": false,
"copy": false,
"associateProjects": false,
"delete": false,
"manageConditions": false
}
},...

When I try to query the API to get the rules that correspond to this profile I do it like so:
https://sonar.mydomain.com/api/rules/search?activation=yes&qprofile=AXmFLismILbYOsnx5Pyt
But I get:

{
"errors": [
{
"msg": "The specified qualityProfile 'AXmFLismILbYOsnx5Pyt' does not exist"
}
]
}

Does the ID need to be encoded in some way for this API to work?

Thank you ver much!

Hey there.

This guide should help you.