Hi @iyera,
You’re correct that this is an internal API and may evolve, but changes are infrequent. Apologies I can’t give a more definitive guarantee!
To your question on getting the Project ID:
You can obtain it using the public API here: https://api-docs.sonarsource.com/sonarqube-cloud/default/public-projectsexternal-0-0-1
First, you’ll need your organization ID, which can be retrieved via this endpoint:
For example, using curl:
curl https://api.sonarcloud.io/organizations/organizations -H "Authorization: Bearer TOKEN"
[
...
{
"id":"AZIFjUfTpBpiNbGlFfHn",
"uuidV4":"f4ca0e5a-3b0b-4b23-bd01-0743f3936b4f",
"key":"fiveshotsnumber2",
"name":"fiveshotsnumber2",
"description":"",
"subscription":"FREE",
"createdAt":1726669998035,
"updatedAt":1743928937740,
"newProjectPrivate":false,
"url":"",
"avatarUrl":"https://avatars.githubusercontent.com/u/103184614?v=4",
"defaultQualityGateUuid":"AWBzEoq-FTEFvoJcI01C",
"onlyPrivateProjects":false,
"enterpriseUpgradable":false,
"enterpriseFeatures":false
}
]
This will return a JSON array of organizations. Look for the uuidV4 field, which you’ll then use to query projects:
curl "https://api.sonarcloud.io/projects/projects?organizationIds=<ORG_ID>" -H "Authorization: Bearer TOKEN"
{
"projects":[
{
"id":"b14cb84f-bed1-47e3-98c8-8831d90cd8bd",
"legacyId":"AZeIgAqBbWH2UWvvgG7y",
"key":"fiveshotsnumber2_javaparser-maven-sample",
"name":"javaparser-maven-sample",
"visibility":"public",
"organizationId":"f4ca0e5a-3b0b-4b23-bd01-0743f3936b4f",
"tags":[
],
"createdAt":"2025-06-19T14:03:02.145Z",
"updatedAt":"2025-06-19T14:03:01.500011Z"
}
],
"page":{
"pageIndex":1,
"pageSize":50,
"total":1
}
}
This response will return project information, including the id needed for dop-translation/project-bindings queries.