Class ScriptingApiResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog.plugins.views.search.rest.scriptingapi.ScriptingApiResource
- All Implemented Interfaces:
PluginRestResource
@Path("/search")
@Consumes("application/json")
@RequiresAuthentication
public class ScriptingApiResource
extends RestResource
implements PluginRestResource
-
Field Summary
Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorDescriptionScriptingApiResource
(SearchExecutor searchExecutor, com.google.common.eventbus.EventBus serverEventBus, SearchRequestSpecToSearchMapper searchCreator, AggregationTabularResponseCreator aggregationTabularResponseCreator, MessagesTabularResponseCreator messagesTabularResponseCreator, QueryParamsToFullRequestSpecificationMapper queryParamsToFullRequestSpecificationMapper) -
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery
(@Valid AggregationRequestSpec aggregationRequestSpec, SearchUser searchUser) executeQuery
(@Valid MessagesRequestSpec messagesRequestSpec, SearchUser searchUser) executeQuery
(String query, Set<String> streams, String timerangeKeyword, List<String> fields, String sort, SortSpec.Direction sortOrder, int from, int size, SearchUser searchUser) executeQuery
(String query, Set<String> streams, String timerangeKeyword, List<String> groups, List<String> metrics, 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
-
ScriptingApiResource
@Inject public ScriptingApiResource(SearchExecutor searchExecutor, com.google.common.eventbus.EventBus serverEventBus, SearchRequestSpecToSearchMapper searchCreator, AggregationTabularResponseCreator aggregationTabularResponseCreator, MessagesTabularResponseCreator messagesTabularResponseCreator, QueryParamsToFullRequestSpecificationMapper queryParamsToFullRequestSpecificationMapper)
-
-
Method Details
-
executeQuery
@POST @Path("messages") public TabularResponse executeQuery(@Valid @Valid MessagesRequestSpec messagesRequestSpec, @Context SearchUser searchUser) -
executeQuery
@GET @Path("messages") public TabularResponse executeQuery(@QueryParam("query") String query, @QueryParam("streams") Set<String> streams, @QueryParam("timerange") String timerangeKeyword, @QueryParam("fields") List<String> fields, @QueryParam("sort") String sort, @QueryParam("sortOrder") SortSpec.Direction sortOrder, @QueryParam("from") int from, @QueryParam("size") int size, @Context SearchUser searchUser) -
executeQuery
@POST @Path("aggregate") public TabularResponse executeQuery(@Valid @Valid AggregationRequestSpec aggregationRequestSpec, @Context SearchUser searchUser) -
executeQuery
@GET @Path("aggregate") public TabularResponse executeQuery(@QueryParam("query") String query, @QueryParam("streams") Set<String> streams, @QueryParam("timerange") String timerangeKeyword, @QueryParam("groups") List<String> groups, @QueryParam("metrics") List<String> metrics, @Context SearchUser searchUser)
-