Create github ALM instance trough REST api

Sonarqube version : 8.4
I want to create a github ALM instance through REST api, but I can’t find some key definitions:

I need the following items for an ALM definition:
appId
clientId
clientSecret
key
privateKey
url

Ik can only find 3 key settings:

“key”: “sonar.auth.github.clientId.secured”
“key”: “sonar.auth.github.clientSecret.secured”
“key”: “sonar.auth.github.apiUrl”

What about appId , key and privateKey ??

Hi,

Have you tried this via the UI? The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

 
Ann

Hello Ann,

I have made an installation through the gui of a github ALM integration.
Whith the api call api/alm_settings/list_definitions I can see all the defined parameters.
When I run the api/system/info I didn’t find any settings corresponding the integration I made with github.com !
So I think there are no ‘standard’ key definitions available?
I could find some in the Administration - ALM Integrations page like
Key: sonar.auth.github.clientSecret.secured
But that key is nog listed in the api/system/info output.

When I want to update the github definition through api/alm_settings/update_github I get an error
{“errors”:[{“msg”:“ALM setting with key ‘github’ cannot be found”}]}
But in the api/alm_settings/list_definitions the key mentioned is github ??

{
“github”: [
{
“key”: “github”,
“url”: “https://api.github.com”,
“appId”: “111111”

Even if I remove the github setting through the gui I get an error when creating a new one.
I use the api call api/alm_settings/create_github

{“errors”:[{“msg”:“A GITHUB setting is already defined”}]}

The call api/alm_settings/list_definitions reports:
{
“github”: ,
“azure”: ,
“bitbucket”: ,
“gitlab”:
}

Regards Bert