I only want to see how many CodeSmells have been RAISED in the last 2 weeks.
And if possible I want to see how many have been solved in the last 2 weeks.
The easiest thing to do here is use the UI to get issue set you want and use your browser’s developer tools to eavesdrop on the calls that pull that data. Regarding counts versus individual issues, I would still use the issues web service here, but limit page size to 1 (&ps=1). The pagination block that’s included in these responses will give you the full count.
Regarding the number closed in the last 2 weeks, sorry but that’s just not something we’ve built for. You’re not going to be able to pull this data from SonarQube.