Api/measures/search_history on SonarCloud returns "Project doesn't exist" for existing project

I’m using the on‑prem SonarQube API successfully with api/measures/search_history. On SonarCloud (cloud), the same call returns:

{“errors”: [{ “msg”: “Project doesn’t exist” }]}

Althought the project exists in my organization dashboard (I also can get the project key when I call api/projects/search). Help appreciated.

More detail:
url: https://sonarqube.us/api/measures/search_history?component=<project_key>&metrics=coverage

Thanks!

Khang

Hi Khang,

Welcome to the community!

For SonarQube Cloud, you’ll need to also include your organization ID in the call. Take a closer look at the SonarQube Cloud API docs. They’re not identical.

 
HTH,
Ann