@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION) .setSince("5.2") .setDescription("Search for metrics") .setResponseExample(getClass().getResource("example-search.json")) .addPagingParams(100, MAX_LIMIT) .addFieldsParam(MetricJsonWriter.OPTIONAL_FIELDS) .setHandler(this); action.createParam(PARAM_IS_CUSTOM) .setExampleValue("true") .setDescription("Choose custom metrics following 3 cases:" + "<ul>" + "<li>true: only custom metrics are returned</li>" + "<li>false: only non custom metrics are returned</li>" + "<li>not specified: all metrics are returned</li>" + "</ul>"); }
@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); }
.setInternal(true); newAction.addPagingParams(20); newAction.addFieldsParam(Arrays.asList("name", "severity")); newAction.addSortParams(Arrays.asList("name", "updatedAt", "severity"), "updatedAt", false);
@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(ACTION) .setSince("5.2") .setDescription("Search for metrics") .setResponseExample(getClass().getResource("example-search.json")) .addPagingParams(100, MAX_LIMIT) .addFieldsParam(MetricJsonWriter.OPTIONAL_FIELDS) .setHandler(this); action.createParam(PARAM_IS_CUSTOM) .setExampleValue("true") .setDescription("Choose custom metrics following 3 cases:" + "<ul>" + "<li>true: only custom metrics are returned</li>" + "<li>false: only non custom metrics are returned</li>" + "<li>not specified: all metrics are returned</li>" + "</ul>"); }
@Override public void define(WebService.NewController context) { WebService.NewAction action = context.createAction(ACTION) .setDescription("List custom measures. The project id or project key must be provided.<br />" + "Requires 'Administer System' permission or 'Administer' permission on the project.") .setSince("5.2") .addFieldsParam(CustomMeasureJsonWriter.OPTIONAL_FIELDS) .addPagingParams(100, MAX_LIMIT) .setResponseExample(getClass().getResource("example-search.json")) .setHandler(this); action.createParam(PARAM_PROJECT_ID) .setDescription("Project id") .setExampleValue("ce4c03d6-430f-40a9-b777-ad877c00aa4d"); action.createParam(PARAM_PROJECT_KEY) .setDescription("Project key") .setExampleValue(KEY_PROJECT_EXAMPLE_001); }
@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(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) .setDescription("List custom measures. The project id or project key must be provided.<br />" + "Requires 'Administer System' permission or 'Administer' permission on the project.") .setSince("5.2") .setDeprecatedSince("7.4") .addFieldsParam(CustomMeasureJsonWriter.OPTIONAL_FIELDS) .addPagingParams(100, MAX_LIMIT) .setResponseExample(getClass().getResource("example-search.json")) .setHandler(this); action.createParam(PARAM_PROJECT_ID) .setDescription("Project id") .setExampleValue("ce4c03d6-430f-40a9-b777-ad877c00aa4d"); action.createParam(PARAM_PROJECT_KEY) .setDescription("Project key") .setExampleValue(KEY_PROJECT_EXAMPLE_001); }