# Web API for SonarQube SubPortfolios

**URL:** <https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768>\
**Category:** SonarQube Server / Community Build\
**Created:** [November 29, 2022, 5:16pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768 "2022-11-29T17:16:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://community.sonarsource.com/u/TomTom)\
**Post date:** [November 29, 2022, 5:16pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768/1 "2022-11-29T17:16:39Z")

</div>

Hello, Is there Web API to view/list subportfolios in SonarQube?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 30, 2022, 3:59pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768/2 "2022-11-30T15:59:18Z")

</div>

Hi,

Welcome to the community!

Have you tried this via the UI? The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

You may also find [this guide](https://community.sonarsource.com/t/how-to-reverse-engineer-the-sonar-web-api/66810) helpful.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://community.sonarsource.com/u/TomTom)\
**Post date:** [November 30, 2022, 4:13pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768/3 "2022-11-30T16:13:05Z")

</div>

Thanks Ann.  
Yes, I’ve done via UI successfully, but wanted to get it done through API.  
I’ll follow the guide you provided to achieve the reverse engineering. Thanks so much!

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://community.sonarsource.com/u/TomTom)\
**Post date:** [December 6, 2022, 6:15pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768/5 "2022-12-06T18:15:22Z")

</div>

Is there an API to perform recompute on portfolios?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [December 7, 2022, 5:51pm UTC](https://community.sonarsource.com/t/web-api-for-sonarqube-subportfolios/76768/6 "2022-12-07T17:51:54Z")

</div>

Hi,

There’s a button in the UI to do this on a Portfolio-by-Portfolio basis: [Portfolio homepage] → Portfolio Settings → Edit Definition → Recompute.

&nbsp;  
HTH,  
Ann
