Set New Code definition per command line/API

Hi,

we’re trying to set the New Code Definition automatically.
We already know about the option to set the new code definition organization-wide. However, we cannot do that because we are a team in the organization and the new code definition ist different in every team.
We are an unbound organization.

In SonarQube there is the possibility to set the new code definition via the following post “/api/new_code_periods/set”. Is there any way to implement this in SonarCloud as well?

Alternatively we would of course be happy about a suitable commando line

Since we have about 300 Projects to import into SonarCloud it would be very helpfull to have a possibility to set the new code definition automatically.

Best Regards

Lucas Krannich

Hey there!

This guide might help you.