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")
public class SearchResource
extends RestResource
implements PluginRestResource
-
Field Summary
Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorDescriptionSearchResource
(SearchDomain searchDomain, SearchExecutor searchExecutor, SearchJobService searchJobService, com.google.common.eventbus.EventBus serverEventBus) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createSearch
(SearchDTO searchRequest, SearchUser searchUser) javax.ws.rs.core.Response
createSearchV2
(SearchDTOv2 searchRequest, SearchUser searchUser) javax.ws.rs.core.Response
executeQuery
(String id, ExecutionState executionState, SearchUser searchUser) javax.ws.rs.core.Response
executeSyncJob
(@NotNull(message="Search body is mandatory") SearchDTO searchRequest, long timeout, SearchUser searchUser) javax.ws.rs.core.Response
executeSyncJobv2
(@NotNull(message="Search body is mandatory") SearchDTOv2 searchRequest, long timeout, SearchUser searchUser) getAllSearches
(SearchUser searchUser) getSearch
(String searchId, SearchUser searchUser) jobStatus
(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
-
Constructor Details
-
SearchResource
@Inject public SearchResource(SearchDomain searchDomain, SearchExecutor searchExecutor, SearchJobService searchJobService, com.google.common.eventbus.EventBus serverEventBus)
-
-
Method Details
-
createSearch
@POST @Consumes({"application/json","application/vnd.graylog.search.v1+json"}) @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public javax.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 javax.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 javax.ws.rs.core.Response executeQuery(@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 javax.ws.rs.core.Response executeSyncJob(@NotNull(message="Search body is mandatory") @NotNull(message="Search body is mandatory") SearchDTO searchRequest, @QueryParam("timeout") @DefaultValue("60000") long timeout, @Context SearchUser searchUser) -
executeSyncJobv2
@POST @Path("sync") @Consumes("application/vnd.graylog.search.v2+json") @Produces("application/vnd.graylog.search.v2+json") public javax.ws.rs.core.Response executeSyncJobv2(@NotNull(message="Search body is mandatory") @NotNull(message="Search body is mandatory") SearchDTOv2 searchRequest, @QueryParam("timeout") @DefaultValue("60000") long timeout, @Context SearchUser searchUser) -
jobStatus
@GET @Path("status/{jobId}") @Produces({"application/json","application/vnd.graylog.search.v1+json"}) public SearchJobDTO jobStatus(@PathParam("jobId") String jobId, @Context SearchUser searchUser)
-