Class SearchResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog.plugins.views.search.rest.SearchResource
- All Implemented Interfaces:
PluginRestResource
@Path("/views/search")
@Produces("application/json")
@Consumes("application/json")
@RequiresAuthentication
public class SearchResource
extends RestResource
implements PluginRestResource
-
Field Summary
FieldsFields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService -
Constructor Summary
ConstructorsConstructorDescriptionSearchResource(SearchDomain searchDomain, SearchExecutor searchExecutor, SearchJobService searchJobService, com.google.common.eventbus.EventBus serverEventBus, ClusterConfigService clusterConfigService) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsecancelJob(String jobId, SearchUser searchUser) jakarta.ws.rs.core.ResponsecreateSearch(SearchDTO searchRequest, SearchUser searchUser) jakarta.ws.rs.core.ResponsecreateSearchV2(SearchDTOv2 searchRequest, SearchUser searchUser) jakarta.ws.rs.core.ResponseexecuteQuery(String id, ExecutionState executionState, SearchUser searchUser) jakarta.ws.rs.core.ResponseexecuteSyncJob(@NotNull(message="Search body is mandatory") SearchDTO searchRequest, long timeout, SearchUser searchUser) jakarta.ws.rs.core.ResponseexecuteSyncJobv2(@NotNull(message="Search body is mandatory") SearchDTOv2 searchRequest, long timeout, SearchUser searchUser) explainQuery(String id, ExecutionState executionState, SearchUser searchUser) getAllSearches(SearchUser searchUser) getSearch(String searchId, SearchUser searchUser) jakarta.ws.rs.core.ResponsejobStatus(String jobId, SearchUser searchUser) Methods inherited from class org.graylog2.shared.rest.resources.RestResource
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint
-
Field Details
-
SEARCH_FORMAT_V1
- See Also:
-
SEARCH_FORMAT_V2
- See Also:
-
-
Constructor Details
-
SearchResource
@Inject public SearchResource(SearchDomain searchDomain, SearchExecutor searchExecutor, SearchJobService searchJobService, com.google.common.eventbus.EventBus serverEventBus, ClusterConfigService clusterConfigService)
-
-
Method Details
-
createSearch
@POST @Consumes({"application/json","application/vnd.graylog.search.v1+json"}) @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public jakarta.ws.rs.core.Response createSearch(SearchDTO searchRequest, @Context SearchUser searchUser) -
createSearchV2
@POST @Consumes("application/vnd.graylog.search.v2+json") @Produces("application/vnd.graylog.search.v2+json") public jakarta.ws.rs.core.Response createSearchV2(SearchDTOv2 searchRequest, @Context SearchUser searchUser) -
getSearch
@GET @Path("{id}") @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public SearchDTO getSearch(@PathParam("id") String searchId, @Context SearchUser searchUser) -
getAllSearches
@GET @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public List<SearchDTO> getAllSearches(@Context SearchUser searchUser) -
executeQuery
@POST @Path("{id}/execute") @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public jakarta.ws.rs.core.Response executeQuery(@PathParam("id") String id, ExecutionState executionState, @Context SearchUser searchUser) -
explainQuery
@POST @Path("{id}/explain") public ExplainResults explainQuery(@PathParam("id") String id, ExecutionState executionState, @Context SearchUser searchUser) -
executeSyncJob
@POST @Path("sync") @Consumes({"application/json","application/vnd.graylog.search.v1+json"}) @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public jakarta.ws.rs.core.Response executeSyncJob(@NotNull(message="Search body is mandatory") @NotNull(message="Search body is mandatory") SearchDTO searchRequest, @QueryParam("timeout") @DefaultValue("60000") @Deprecated long timeout, @Context SearchUser searchUser) -
executeSyncJobv2
@POST @Path("sync") @Consumes("application/vnd.graylog.search.v2+json") @Produces("application/vnd.graylog.search.v2+json") public jakarta.ws.rs.core.Response executeSyncJobv2(@NotNull(message="Search body is mandatory") @NotNull(message="Search body is mandatory") SearchDTOv2 searchRequest, @QueryParam("timeout") @DefaultValue("60000") @Deprecated long timeout, @Context SearchUser searchUser) -
jobStatus
@GET @Path("status/{jobId}") @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public jakarta.ws.rs.core.Response jobStatus(@PathParam("jobId") String jobId, @Context SearchUser searchUser) -
cancelJob
@DELETE @Path("cancel/{jobId}") @Produces("application/json") public jakarta.ws.rs.core.Response cancelJob(@PathParam("jobId") String jobId, @Context SearchUser searchUser)
-