Get all active rules by Quality Profile via API

Hi!

I am trying to get all the active rules used by Quality Profile via API calls. I’ve tried using api/qualityprofiles/backup?qualityProfile=qp%20name (which didn’t return anything) and api/rules/search?activation=true (which did return all the rules, active and not active, used in my SQ instance).
If it is not possible I would be happy with getting just all the active rules and not by Quality Profile.

The current version of SQ I’m using is 8.4.1 (build 35646).

Thanks in advance!

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.4.1 → 8.9.9 → 9.6 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

I would also recommend reviewing this guide:

After checking the response and realizing that the results were paginated I’ve use “/api/rules/search?activation=true&qprofile=yourqpcode” iterating to get all the rules.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.