Class StreamResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog2.rest.resources.streams.StreamResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.google.common.collect.ImmutableMap<String,
SearchQueryField> Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorsConstructorDescriptionStreamResource
(StreamService streamService, PaginatedStreamService paginatedStreamService, StreamRuleService streamRuleService, StreamRouterEngine.Factory streamRouterEngineFactory, IndexSetRegistry indexSetRegistry) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
cloneStream
(String streamId, @Valid @NotNull CloneStreamRequest cr, UserContext userContext) javax.ws.rs.core.Response
create
(CreateStreamRequest cr, UserContext userContext) void
get()
Deprecated.void
void
update
(String streamId, @Valid @NotNull UpdateStreamRequest cr) 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_FIELD_MAPPING
protected static final com.google.common.collect.ImmutableMap<String,SearchQueryField> SEARCH_FIELD_MAPPING
-
-
Constructor Details
-
StreamResource
@Inject public StreamResource(StreamService streamService, PaginatedStreamService paginatedStreamService, StreamRuleService streamRuleService, StreamRouterEngine.Factory streamRouterEngineFactory, IndexSetRegistry indexSetRegistry)
-
-
Method Details
-
create
@POST @Timed @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response create(CreateStreamRequest cr, @Context UserContext userContext) throws ValidationException - Throws:
ValidationException
-
getPage
@GET @Timed @Path("/paginated") @Produces("application/json") public StreamPageListResponse getPage(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @QueryParam("query") @DefaultValue("") String query, @DefaultValue("title") @QueryParam("sort") String sort, @DefaultValue("asc") @QueryParam("order") String order) -
get
Deprecated. -
getEnabled
@GET @Path("/enabled") @Timed @Produces("application/json") public StreamListResponse getEnabled() throws NotFoundException- Throws:
NotFoundException
-
get
@GET @Path("/{streamId}") @Timed @Produces("application/json") public StreamResponse get(@PathParam("streamId") @NotEmpty @NotEmpty String streamId) throws NotFoundException - Throws:
NotFoundException
-
update
@PUT @Timed @Path("/{streamId}") @Consumes("application/json") @Produces("application/json") public StreamResponse update(@PathParam("streamId") String streamId, @Valid @NotNull @Valid @NotNull UpdateStreamRequest cr) throws NotFoundException, ValidationException - Throws:
NotFoundException
ValidationException
-
delete
@DELETE @Path("/{streamId}") @Timed public void delete(@PathParam("streamId") String streamId) throws NotFoundException - Throws:
NotFoundException
-
pause
@POST @Path("/{streamId}/pause") @Timed public void pause(@PathParam("streamId") @NotEmpty @NotEmpty String streamId) throws NotFoundException, ValidationException - Throws:
NotFoundException
ValidationException
-
resume
@POST @Path("/{streamId}/resume") @Timed public void resume(@PathParam("streamId") @NotEmpty @NotEmpty String streamId) throws NotFoundException, ValidationException - Throws:
NotFoundException
ValidationException
-
testMatch
@POST @Path("/{streamId}/testMatch") @Timed public TestMatchResponse testMatch(@PathParam("streamId") String streamId, @NotNull @NotNull Map<String, Map<String, throws NotFoundExceptionObject>> serialisedMessage) - Throws:
NotFoundException
-
cloneStream
@POST @Path("/{streamId}/clone") @Timed @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response cloneStream(@PathParam("streamId") String streamId, @Valid @NotNull @Valid @NotNull CloneStreamRequest cr, @Context UserContext userContext) throws ValidationException, NotFoundException - Throws:
ValidationException
NotFoundException
-