Class SearchResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.SearchResource
API REST Resource for searching for entities in Confluence. Generally delegates to the CQLSearchService.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SearchResource
-
-
Method Details
-
search
public SearchPageResponse<SearchResult> search(String cql, String cqlcontext, String excerpt, String expand, int offset, String afterOffset, int limit, boolean includeArchivedSpaces, @Context javax.ws.rs.core.UriInfo uriInfo) Search for entities in Confluence using the Confluence Query Language (CQL)For example:
Example request URI(s):
http://localhost:8080/confluence/rest/api/search?cql=creator=currentUser()invalid input: '&type'%20in%20(space,page,user)invalid input: '&cqlcontext'={%22spaceKey%22:%22TST%22, %22contentId%22:%2255%22}
http://localhost:8080/confluence/rest/api/search?cql=siteSearch~'example'%20AND%20label=docsinvalid input: '&expand'=content.space,space.homepageinvalid input: '&limit'=10
- Parameters:
cql
- the CQL query see advanced searching in confluence using CQLcqlcontext
- the execution context for CQL functions, provides current space key and content id. If this is not provided some CQL functions will not be available.excerpt
- the excerpt strategy to apply to the result, one of : indexed, highlight, none. This defaults to highlight.expand
- the properties to expand on the search result, this may cause database requests for some propertieslimit
- the limit of the number of items to return, this may be restricted by fixed system limitsincludeArchivedSpaces
- whether to include content in archived spaces in the result, this defaults to falsestart
- the start point of the collection to return- Returns:
- a JSON representation of the list of search results that the user is permitted to see
-