Can I change a value in via API?


(Jonathan Velasco) #1

Hello everyone,

I need to know if is posibly to change file via API, because im using Sonarqube with Keycloak and protocol SAML, so I need to change cert or other parameters when I will need it and made manual with multi sonar server is so tedious, es better with automation and one idea is using API

I loooking fro in doc but I dont see nothing about that


SAML authentication plugin automatic install
(Colin Mueller) #2

Check out the Web API documentation linked in the footer of your instance (hint: api/settings!)

(Jonathan Velasco) #4

Hello @ColinHMueller,

Ty for reply, I am wachting api and see values of SAML plugins in are read-only? So if hace value I cant change then ? How about this discription: api-setting-set

The only way is that values are blank? :frowning:


(Colin Mueller) #5

@Jonathan_Velasco At least for SonarSource’s [SAML Authentication Plugin|], those related settings are set through the UI (thus also able to be manipulated with the Web API). They aren’t set in a file. I can’t speak for other plugins.

(G Ann Campbell) #6


Colin answered the question in the body of the OP. For the sake of posterity, I’d like to answer the question in the title.

No, you cannot reset, override, &etc values set in via the UI / web services. Conversely, you cannot set in values that are set via the UI / web services.

…and never the twain shall meet.


(Jonathan Velasco) #7

Hello @ganncamp ,

I have one more question, but is posible set values if the key of properties is empty?

For example, I want set this keys of plugin SAML in

sonar.auth.saml.enabled= (to true)
sonar.auth.saml.certificate.secured= (cert here)

Is posible with API set this values?


(G Ann Campbell) #8


Yes, it should be. Look at /api/settings/set.