use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class DeactivateAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction("deactivate").setDescription("Deactivate a user. Requires Administer System permission").setSince("3.7").setPost(true).setResponseExample(getClass().getResource("example-deactivate.json")).setHandler(this);
action.createParam("login").setDescription("User login").setRequired(true).setExampleValue("myuser");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class RemoveUserAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("remove_user").setDescription(format("Remove a user from a group.<br />" + "'%s' or '%s' must be provided.<br>" + "Requires the following permission: 'Administer System'.", PARAM_GROUP_ID, PARAM_GROUP_NAME)).setHandler(this).setPost(true).setSince("5.2");
defineGroupWsParameters(action);
defineLoginWsParameter(action);
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class UsersAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("users").setDescription("Search for users with membership information with respect to a group.<br>" + "Requires the following permission: 'Administer System'.").setHandler(this).setSince("5.2").setResponseExample(getClass().getResource("users-example.json")).addSelectionModeParam().addSearchQuery("freddy", "names", "logins").addPagingParams(25);
defineGroupWsParameters(action);
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class SuggestionsAction method define.
@Override
public void define(WebService.NewController context) {
NewAction action = context.createAction(ACTION_SUGGESTIONS).setDescription("Internal WS for the top-right search engine").setSince("4.2").setInternal(true).setHandler(this).setResponseExample(Resources.getResource(this.getClass(), "components-example-suggestions.json"));
action.createParam(URL_PARAM_QUERY).setRequired(true).setDescription("Substring of project key (minimum 2 characters)").setExampleValue("sonar");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class SetTagsAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction(ACTION_SET_TAGS).setPost(true).setSince("5.1").setDescription("Set tags on an issue. <br/>" + "Requires authentication and Browse permission on project<br/>" + "Since 6.3, the parameter 'key' has been replaced by '%s'", PARAM_ISSUE).setResponseExample(Resources.getResource(this.getClass(), "set_tags-example.json")).setHandler(this);
action.createParam(PARAM_ISSUE).setDescription("Issue key").setSince("6.3").setDeprecatedKey("key", "6.3").setExampleValue(Uuids.UUID_EXAMPLE_01).setRequired(true);
action.createParam(PARAM_TAGS).setDescription("Comma-separated list of tags. All tags are removed if parameter is empty or not set.").setExampleValue("security,cwe,misra-c");
}
Aggregations