SonarQube Rules search web API does not support 'type'

SonarQube 7.9.1 LTS

I am trying to extract all available java rules using web api, but noticed that the selection parameter “f” does not support “type”.

Is there any specific reason ? Type (BUG, CODE_SMELL…) is really crucial so I don’t understand why it would have been left out.

My bad ! “Type” is really considered so crucial that it is “always” returned. :slight_smile:

I had tried to pass “type” as a value and received following error which led me to believe type is not supported by “f” parameter, but looks like there is no need to pass “type” as it is always returned.

{“errors”:[{“msg”:“Value of parameter ‘f’ (type) must be one of: [actives, createdAt, debtOverloaded, debtRemFn, defaultDebtRemFn, defaultRemFn, effortToFixDescription, gapDescription, htmlDesc, htmlNote, internalKey, isExternal, isTemplate, lang, langName, mdDesc, mdNote, name, noteLogin, params, remFn, remFnOverloaded, repo, scope, severity, status, sysTags, tags, templateKey, updatedAt]”}]}

I believe at least documentation should be updated to reflect this. It says nothing about this behavior.

I’m glad you figure it out. We’ll update the description so that it mentions those are additional fields to be returned.

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