SonarQube - PAT RENEWAL API CALL - Issue!

Hi, I am trying to update the PAT Token using the below web API call.
/api/alm_integrations/set_pat

Method :- POST
As an authentication method I am using Bearer Token & in the parameter field I am passing pat information.
However I get a 204 No Content response.

I also tried to retrieve existing PAT information while executing following API,
api/alm_integrations/check_pat
METHOD :- GET
Param passed, almSetting
However I get a response :- 400 Bad request. (Invalid Personal access token)

Not sure if I am missing something in these GET and POST calls ?

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.

You may also find this guide helpful.

 
HTH,
Ann

1 Like

Thank you so much Ann, This helped. Managed to get it working after checking the browser dev tools. The API called to update the necessary PAT token was much different than one documented in SonarQube Web API Help tab.

Appreciate your help and response !

1 Like