Endpoint throwing 400 error with message "'organization' parameter is missing"

We integrate with the SonarQube API to help our customers retrieve their data and transfer it to their destination.
For one of our customer integrations, we observed that when making API calls to the projects/search and components/search endpoints, we are receiving a 400 error with the message “The ‘organization’ parameter is missing.”
However, the API documentation does not mention specifying the organization parameter.
Do you have any idea what might be going wrong?

Affected endpoints:
https://sonarcloud.io/api/components/search
https://sonarcloud.io/api/projects/search

Looking forward to your insights.

It’s right there in the docs!

Note that organization only exists in the context of SonarQube Cloud.

Hi Colin,

Could you please briefly explain the major differences between SonarQube Server and SonarQube Cloud endpoints?

There are too many to list! You’ll need to refer to the documentation of each API in each product to be sure.

1 Like