I'm attempting to set tags via the SonarQube REST API, however, the REST API doesn't come with a lot of examples for different scenarios.
In my case I'm attempting to set the tags for a given projectKey with an API Key. I want to use Invoke-RestMethod instead of Curl, since I'll be running the script in powershell.
Solution - tested on SonarQube 9.2.4 The biggest hassle is to figure out how the authentication works. This script is inteded to be used in f.ex. a build agent. The API for SonarQube is weird and not necessarily easy to use.