Is there any mapping available between a SonarQube project and permission template at database?

I am working on an automation of integrating authentication with GitLab and enable entitlements based on the GitLab groups via creating and applying permission templates, as a part of the automation.

Before I run this, I would like to know if there are any options available for me to extract the current mapping of each SonarQube projects with the corresponding permission templates. With this, I can extract the information as a backup and restore (trigger API to apply template one by one) if anything goes wrong.

The APIs will not be helpful in my scenario for extracting the information as we have around 20K projects where API can return up to max of 10K projects. So, I am looking for any mapping information from database. Where should I capture the link between these two?

Hey there.

Permission templates are applied at project creation, and no link between them is stored in SonarQube.

Which APIs are you facing a limit on?

Hi @Colin ,

Thank you for clarifying that permission template mapping is not being stored at database.

The limitation we have is on the search api. We have already submitted a ticket (SUPPORT-42556) with Sonar and got the below response.

Being able to retrieve only the first 10k results is a known limitation of ElasticSearch. The API endpoints that fetch data from ElasticSearch (as opposed to the database) do have this limitation. The only generally applicable workaround is using the parameter available on the API endpoint, however, I see that you have already done this to return only the projects.

Thanks again!