Are there APIs that we can call to fetch metrics shown in the portfolio page?
general advice = to get familiar with the web api of some tool, use your browser dev tools to see what’s going on. Then use your browser or a tool like postman and try different web api calls.
In your case it’s something like
id / component is the
name of your portfolio, i.e.
the red rectangles have the name/id of the portfolio
https://yoursonarhost/web_api for the builtin web api docs or
https://yoursonarhost/web_api?deprecated=true&internal=true also showing the internal
and deprecated parts.