java.lang.Object
com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
com.atlassian.crowd.plugin.rest.service.resource.usermanagement.SearchResource

@Path("search") @Consumes({"application/xml","application/json"}) @Produces({"application/xml","application/json"}) public class SearchResource extends AbstractResource
Search resource.
  • Constructor Details

    • SearchResource

      @Inject public SearchResource(SearchController searchController)
  • Method Details

    • search

      @POST public javax.ws.rs.core.Response search(@QueryParam("entity-type") String entityType, @QueryParam("max-results") @DefaultValue("1000") int maxResults, @QueryParam("start-index") @DefaultValue("0") int startIndex, SearchRestrictionEntity searchRestriction) throws DirectoryNotFoundException, OperationFailedException
      Searches for entities of entity-type (either 'user' or 'group') satisfying the given search restriction.
      Parameters:
      entityType - type of the entity to search
      maxResults - maximum number of results returned
      startIndex - starting index of the results
      searchRestriction - restriction entities must satisfy
      Throws:
      DirectoryNotFoundException
      OperationFailedException
    • searchByCql

      @GET public javax.ws.rs.core.Response searchByCql(@QueryParam("entity-type") String entityType, @DefaultValue("1000") @QueryParam("max-results") int maxResults, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("") @QueryParam("restriction") String cqlSearchRestriction) throws DirectoryNotFoundException, OperationFailedException
      Searches for entities of entity-type (either 'user' or 'group') with the specified search restriction (as Crowd Query Language).
      Parameters:
      entityType - type of the entity to search
      maxResults - maximum number of results returned
      startIndex - starting index of the results
      cqlSearchRestriction - restriction entities must satisfy in the Crowd Query Language
      Throws:
      DirectoryNotFoundException
      OperationFailedException