How to resolve project key to internal projectId for dop-translation/project-bindings API in automat

We are automating SonarCloud project binding using the POST dop-translation/project-bindings endpoint in an Enterprise plan with Azure DevOps. We have confirmed this endpoint works — we received a 201 response in testing.

The endpoint requires an internal alphanumeric projectId (e.g. AZ8ncjlqXRpWu8-v2dRP), not the project key. We create projects via api/projects/create, which returns only key, name, and qualifier — no internal ID.

We tested the following public endpoints and none return the internal ID with token authentication:

  • api/components/show?component={key} — returns key, name, qualifier, no ID
  • api/projects/search?projects={key} — same, no ID
  • api/navigation/component?component={key} — returns the internal ID but requires browser session authentication, returns 403 with Bearer token

What is the supported, token-authenticated way to resolve a project key to its internal ID for use with the binding API in an automation context? Is this a documented gap, and is there a workaround or a planned public endpoint?

Hello @Rhyss_Haiqal,

I can see you also have a support ticket in our Help center open for this. Since the support team will be able to look into the specifics of your organization directly and help you more efficiently there, I’d recommend continuing the conversation in that channel.

In the future please submit your requests to the Help center since your team has a Support contract.

I’ll close this thread to avoid any duplication.

Cheers,

Stevan