Badges API : unknown URL issue

Sonarqube version : Developer 9.6


Following Sonarqube web API badges documentation, I tried to build a GET API call to get the token for an existing project providing the project key as parameter, using a User token to access it:

curl -su squ_654ca70f089b7eb978f4ebe3bfe4fa80a16fc81a: "https://mysonarqube.instance/api/project_badges/token&project=my-project-key"

However, I get this error message whereas the URL looks formatted as defined into the documentation:

{"errors":[{"msg":"Unknown url : /api/project_badges/token\u0026project\u003dmy-project-key"}]}

Could someone please check if my API call was correct and provide an example ?

Hey there.

You need to use a ? instead of a & before your first query parameter.


Oh my bad, thanks !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.