I added a project from Bitbucket and I’m wondering if there’s a way I can get his Bitbucket ID through the SonarCloud API. I need to merge data from Bitbucket and Sonar, but in order to do that I need a way to link them both.
The api/projects/search endpoint returns a project key of the shape: “organization_project-slug”, but that name does not always coincide with the name in Bitbucket. How do you maintain that reference internally?
We currently don’t have any public API that allows to know that and we don’t expose publicly this binding between a repo and a project.
You could eventually rely on the api/navigation/component api, which is an internal api endpoint, so it’s subject to changes but has been pretty stable lately. In the response of this api you have the following data: