@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction("search") .setDescription("Search tags") .setSince("6.4") .setResponseExample(getClass().getResource("search-example.json")) .setHandler(this); action.addSearchQuery("off", "tags"); action.createPageSize(10, 100); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction("search_templates") .setDescription("List permission templates.<br />" + "Requires the following permission: 'Administer System'.") .setResponseExample(getClass().getResource("search_templates-example.json")) .setSince("5.2") .addSearchQuery("defau", "permission template names") .setHandler(this); WsParameters.createOrganizationParameter(action).setSince("6.2"); }
@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(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(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION); action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response")); action .setDescription("List ghost projects.<br> " + "With the current architecture, it's no more possible to have invisible ghost projects. Therefore, the web service is deprecated.<br> " + "Requires 'Administer System' permission.") .setResponseExample(Resources.getResource(getClass(), "ghosts-example.json")) .setSince("5.2") .setDeprecatedSince("6.6") .addPagingParams(100, MAX_LIMIT) .addFieldsParam(POSSIBLE_FIELDS) .addSearchQuery("sonar", "names", "keys") .setHandler(this); action.createParam(PARAM_ORGANIZATION) .setDescription("Organization key") .setRequired(false) .setInternal(true) .setSince("6.3"); }
@Override public void define(WebService.NewController controller) { WebService.NewAction action = controller.createAction("provisioned"); action .setDescription( "Get the list of provisioned projects.<br> " + "Web service is deprecated. Use api/projects/search instead, with onProvisionedOnly=true.<br> " + "Require 'Create Projects' permission.") .setSince("5.2") .setDeprecatedSince("6.6") .setResponseExample(Resources.getResource(getClass(), "provisioned-example.json")) .setHandler(this) .addPagingParams(100, MAX_LIMIT) .addSearchQuery("sonar", "names", "keys") .addFieldsParam(POSSIBLE_FIELDS); action.setChangelog( new Change("6.4", "The 'uuid' field is deprecated in the response"), new Change("6.4", "Paging response fields is now in a Paging object")); support.addOrganizationParam(action); }
@Override public void define(NewController context) { WebService.NewAction action = context.createAction("search") .setDescription("Search for user groups.<br>" + "Requires the following permission: 'Administer System'.") .setHandler(this) .setResponseExample(getClass().getResource("search-example.json")) .setSince("5.2") .addFieldsParam(ALL_FIELDS) .addPagingParams(100, MAX_LIMIT) .addSearchQuery("sonar-users", "names") .setChangelog(new Change("6.4", "Paging response fields moved to a Paging object"), new Change("6.4", "'default' response field has been added")); action.createParam(PARAM_ORGANIZATION_KEY) .setDescription("Key of organization. If not set then groups are searched in default organization.") .setExampleValue("my-org") .setSince("6.2") .setInternal(true); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction("search_members") .setDescription("Search members of an organization") .setResponseExample(getClass().getResource("search_members-example.json")) .setSince("6.4") .setInternal(true) .setHandler(this); action.addSearchQuery("orwe", "names", "logins"); action.addPagingParams(50, MAX_LIMIT); action.createParam(Param.SELECTED) .setDescription("Depending on the value, show only selected items (selected=selected) or deselected items (selected=deselected).") .setInternal(true) .setDefaultValue(SelectionMode.SELECTED.value()) .setPossibleValues(SelectionMode.SELECTED.value(), SelectionMode.DESELECTED.value()); action.createParam("organization") .setDescription("Organization key") .setInternal(true) .setRequired(false); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction("search_templates") .setDescription("List permission templates.<br />" + "Requires the following permission: 'Administer System'.") .setResponseExample(getClass().getResource("search_templates-example.json")) .setSince("5.2") .addSearchQuery("defau", "permission template names") .setHandler(this); createOrganizationParameter(action).setSince("6.2"); }
@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("search") .setDescription("Search tags") .setSince("6.4") .setResponseExample(getClass().getResource("search-example.json")) .setHandler(this); action.addSearchQuery("off", "tags"); action.createPageSize(10, 100); }
@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(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 context) { WebService.NewAction action = context.createAction("search") .setDescription("Search for user groups.<br>" + "Requires the following permission: 'Administer System'.") .setHandler(this) .setResponseExample(getClass().getResource("search-example.json")) .setSince("5.2") .addFieldsParam(ALL_FIELDS) .addPagingParams(100, MAX_LIMIT) .addSearchQuery("sonar-users", "names") .setChangelog(new Change("6.4", "Paging response fields moved to a Paging object"), new Change("6.4", "'default' response field has been added")); action.createParam(PARAM_ORGANIZATION_KEY) .setDescription("Key of organization. If not set then groups are searched in default organization.") .setExampleValue("my-org") .setSince("6.2") .setInternal(true); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION); action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response")); action .setDescription("List ghost projects.<br> " + "With the current architecture, it's no more possible to have invisible ghost projects. Therefore, the web service is deprecated.<br> " + "Requires 'Administer System' permission.") .setResponseExample(Resources.getResource(getClass(), "ghosts-example.json")) .setSince("5.2") .setDeprecatedSince("6.6") .addPagingParams(100, MAX_LIMIT) .addFieldsParam(POSSIBLE_FIELDS) .addSearchQuery("sonar", "names", "keys") .setHandler(this); action.createParam(PARAM_ORGANIZATION) .setDescription("Organization key") .setRequired(false) .setInternal(true) .setSince("6.3"); }
@Override public void define(WebService.NewController controller) { WebService.NewAction action = controller.createAction("provisioned"); action .setDescription( "Get the list of provisioned projects.<br> " + "Web service is deprecated. Use api/projects/search instead, with onProvisionedOnly=true.<br> " + "Require 'Create Projects' permission.") .setSince("5.2") .setDeprecatedSince("6.6") .setResponseExample(Resources.getResource(getClass(), "provisioned-example.json")) .setHandler(this) .addPagingParams(100, MAX_LIMIT) .addSearchQuery("sonar", "names", "keys") .addFieldsParam(POSSIBLE_FIELDS); action.setChangelog( new Change("6.4", "The 'uuid' field is deprecated in the response"), new Change("6.4", "Paging response fields is now in a Paging object")); support.addOrganizationParam(action); }