Update not custom rule via api

i am trying to update indentation level to 4 spaces using api.

I could change it via web interface:


But via api it’s imposible, it tolds that i should use a custom rule:

curl -s -X POST 'http://user:pass@sonarinstance.domain/api/rules/create?custom_key=kite:0001&markdown_description=Java%20Identation%204&name=Java%20Identation%204&severity=MINOR'
{"errors":[{"msg":"The 'template_key' parameter is missing"}]}

I have tried to create a custom template, but i don’t know what to use:

It seems that none of them fit

Why i could update rule through web but not via api?
Could you help me?


Hey there.

You are actually looking for GET api/qualityprofiles/activate_rule

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.