@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); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context .createAction(ACTION_SEARCH_USERS) .setDescription("List the users that are allowed to edit a Quality Profile.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>'Administer Quality Profiles'</li>" + " <li>Edit right on the specified quality profile</li>" + "</ul>") .setHandler(this) .setInternal(true) .addSearchQuery("freddy", "names", "logins") .addSelectionModeParam() .addPagingParams(25) .setResponseExample(getClass().getResource("search_users-example.json")) .setSince("6.6"); action.createParam(PARAM_QUALITY_PROFILE) .setDescription("Quality Profile name") .setRequired(true) .setExampleValue("Recommended quality profile"); action .createParam(PARAM_LANGUAGE) .setDescription("Quality profile language") .setRequired(true) .setPossibleValues(Arrays.stream(languages.all()).map(Language::getKey).collect(toSet())); createOrganizationParam(action); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context .createAction(ACTION_SEARCH_GROUPS) .setDescription("List the groups that are allowed to edit a Quality Profile.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>'Administer Quality Profiles'</li>" + " <li>Edit right on the specified quality profile</li>" + "</ul>") .setHandler(this) .setInternal(true) .addSelectionModeParam() .addSearchQuery("sonar", "group names") .addPagingParams(25) .setResponseExample(getClass().getResource("search_groups-example.json")) .setSince("6.6"); action.createParam(PARAM_QUALITY_PROFILE) .setDescription("Quality Profile name") .setRequired(true) .setExampleValue("Recommended quality profile"); action .createParam(PARAM_LANGUAGE) .setDescription("Quality profile language") .setRequired(true) .setPossibleValues(Arrays.stream(languages.all()).map(Language::getKey).collect(toSet())); createOrganizationParam(action); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context .createAction(ACTION_SEARCH_USERS) .setDescription("List the users that are allowed to edit a Quality Profile.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>'Administer Quality Profiles'</li>" + " <li>Edit right on the specified quality profile</li>" + "</ul>") .setHandler(this) .setInternal(true) .addSearchQuery("freddy", "names", "logins") .addSelectionModeParam() .addPagingParams(25) .setResponseExample(getClass().getResource("search_users-example.json")) .setSince("6.6"); action.createParam(PARAM_QUALITY_PROFILE) .setDescription("Quality Profile name") .setRequired(true) .setExampleValue("Recommended quality profile"); action .createParam(PARAM_LANGUAGE) .setDescription("Quality profile language") .setRequired(true) .setPossibleValues(Arrays.stream(languages.all()).map(Language::getKey).collect(toSet())); createOrganizationParam(action); }
@Override public void define(WebService.NewController controller) { WebService.NewAction action = controller.createAction("search") .setDescription("Search for projects associated (or not) to a quality gate.<br/>" + "Only authorized projects for current user will be returned.") .setSince("4.3") .setResponseExample(Resources.getResource(this.getClass(), "search-example.json")) .setHandler(this); action.createParam(PARAM_GATE_ID) .setDescription("Quality Gate ID") .setRequired(true) .setExampleValue("1"); action.createParam(PARAM_QUERY) .setDescription("To search for projects containing this string. If this parameter is set, \"selected\" is set to \"all\".") .setExampleValue("abc"); action.addSelectionModeParam(); action.createParam(PARAM_PAGE) .setDescription("Page number") .setDefaultValue("1") .setExampleValue("2"); action.createParam(PARAM_PAGE_SIZE) .setDescription("Page size") .setExampleValue("10"); wsSupport.createOrganizationParam(action); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context .createAction(ACTION_SEARCH_GROUPS) .setDescription("List the groups that are allowed to edit a Quality Profile.<br>" + "Requires one of the following permissions:" + "<ul>" + " <li>'Administer Quality Profiles'</li>" + " <li>Edit right on the specified quality profile</li>" + "</ul>") .setHandler(this) .setInternal(true) .addSelectionModeParam() .addSearchQuery("sonar", "group names") .addPagingParams(25) .setResponseExample(getClass().getResource("search_groups-example.json")) .setSince("6.6"); action.createParam(PARAM_QUALITY_PROFILE) .setDescription("Quality Profile name") .setRequired(true) .setExampleValue("Recommended quality profile"); action .createParam(PARAM_LANGUAGE) .setDescription("Quality profile language") .setRequired(true) .setPossibleValues(Arrays.stream(languages.all()).map(Language::getKey).collect(toSet())); createOrganizationParam(action); }
@Override public void define(NewController context) { NewAction action = context.createAction("groups") .setDescription("Lists the groups a user belongs to. <br/>" + "Requires Administer System permission.") .setHandler(this) .setResponseExample(getClass().getResource("groups-example.json")) .addSelectionModeParam() .addSearchQuery("users", "group names") .addPagingParams(25) .setChangelog(new Change("6.4", "Paging response fields moved to a Paging object"), new Change("6.4", "'default' response field has been added")) .setSince("5.2"); action.createParam(PARAM_LOGIN) .setDescription("A user login") .setExampleValue("admin") .setRequired(true); action.createParam(PARAM_ORGANIZATION) .setDescription("Organization key") .setExampleValue("my-org") .setInternal(true) .setSince("6.4"); }
@Override public void define(NewController controller) { NewAction action = controller.createAction("projects") .setSince("5.2") .setHandler(this) .setDescription("List projects with their association status regarding a quality profile") .setResponseExample(getClass().getResource("projects-example.json")); action.setChangelog( new Change("7.2", "'more' response field is deprecated"), new Change("6.5", "'id' response field is deprecated"), new Change("6.0", "'uuid' response field is deprecated and replaced by 'id'"), new Change("6.0", "'key' response field has been added to return the project key")); action.createParam(PARAM_KEY) .setDescription("Quality profile key") .setRequired(true) .setExampleValue(UUID_EXAMPLE_01); action.addSelectionModeParam(); action.createSearchQuery("sonar", "projects") .setDeprecatedKey("query", "6.5"); action.createPageParam() .setDeprecatedKey("page", "6.5"); action.createPageSize(100, MAX_PAGE_SIZE); }
@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); }
@Override public void define(WebService.NewController controller) { WebService.NewAction action = controller.createAction("search") .setDescription("Search for projects associated (or not) to a quality gate.<br/>" + "Only authorized projects for current user will be returned.") .setSince("4.3") .setResponseExample(Resources.getResource(this.getClass(), "search-example.json")) .setHandler(this); action.createParam(PARAM_GATE_ID) .setDescription("Quality Gate ID") .setRequired(true) .setExampleValue("1"); action.createParam(PARAM_QUERY) .setDescription("To search for projects containing this string. If this parameter is set, \"selected\" is set to \"all\".") .setExampleValue("abc"); action.addSelectionModeParam(); action.createParam(PARAM_PAGE) .setDescription("Page number") .setDefaultValue("1") .setExampleValue("2"); action.createParam(PARAM_PAGE_SIZE) .setDescription("Page size") .setExampleValue("10"); wsSupport.createOrganizationParam(action); }
@Override public void define(NewController controller) { NewAction action = controller.createAction("projects") .setSince("5.2") .setHandler(this) .setDescription("List projects with their association status regarding a quality profile") .setResponseExample(getClass().getResource("projects-example.json")); action.setChangelog( new Change("7.2", "'more' response field is deprecated"), new Change("6.5", "'id' response field is deprecated"), new Change("6.0", "'uuid' response field is deprecated and replaced by 'id'"), new Change("6.0", "'key' response field has been added to return the project key")); action.createParam(PARAM_KEY) .setDescription("Quality profile key") .setRequired(true) .setExampleValue(UUID_EXAMPLE_01); action.addSelectionModeParam(); action.createSearchQuery("sonar", "projects") .setDeprecatedKey("query", "6.5"); action.createPageParam() .setDeprecatedKey("page", "6.5"); action.createPageSize(100, MAX_PAGE_SIZE); }
@Override public void define(NewController context) { NewAction action = context.createAction("groups") .setDescription("Lists the groups a user belongs to. <br/>" + "Requires Administer System permission.") .setHandler(this) .setResponseExample(getClass().getResource("groups-example.json")) .addSelectionModeParam() .addSearchQuery("users", "group names") .addPagingParams(25) .setChangelog(new Change("6.4", "Paging response fields moved to a Paging object"), new Change("6.4", "'default' response field has been added")) .setSince("5.2"); action.createParam(PARAM_LOGIN) .setDescription("A user login") .setExampleValue("admin") .setRequired(true); action.createParam(PARAM_ORGANIZATION) .setDescription("Organization key") .setExampleValue("my-org") .setInternal(true) .setSince("6.4"); }