Class GrokResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog2.rest.resources.system.GrokResource
@RequiresAuthentication
@Path("/system/grok")
@Produces("application/json")
@Consumes("application/json")
public class GrokResource
extends RestResource
-
Field Summary
Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorDescriptionGrokResource
(GrokPatternService grokPatternService, PaginatedGrokPatternService paginatedGrokPatternService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
bulkUpdatePatterns
(@NotNull GrokPatternList patternList, boolean deprecatedDropAllExisting, GrokPatternService.ImportStrategy importStrategy) javax.ws.rs.core.Response
bulkUpdatePatternsFromTextFile
(@NotNull InputStream patternsFile, boolean deprecatedDropAllExisting, GrokPatternService.ImportStrategy importStrategy) javax.ws.rs.core.Response
createPattern
(@Valid @NotNull GrokPattern pattern) Deprecated.listPattern
(String patternId) void
removePattern
(String patternId) javax.ws.rs.core.Response
testPattern
(GrokPatternTestRequest request) updatePattern
(String patternId, GrokPattern pattern) Methods inherited from class org.graylog2.shared.rest.resources.RestResource
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint
-
Constructor Details
-
GrokResource
@Inject public GrokResource(GrokPatternService grokPatternService, PaginatedGrokPatternService paginatedGrokPatternService)
-
-
Method Details
-
listGrokPatterns
Deprecated. -
getPage
@GET @Timed @Path("/paginated") @Produces("application/json") public PaginatedResponse<GrokPattern> getPage(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @QueryParam("query") @DefaultValue("") String query, @DefaultValue("name") @QueryParam("sort") String sort, @DefaultValue("asc") @QueryParam("order") String order) -
listPattern
@GET @Timed @Path("/{patternId}") public GrokPattern listPattern(@PathParam("patternId") String patternId) throws NotFoundException - Throws:
NotFoundException
-
testPattern
@POST @Timed @Path("/test") public javax.ws.rs.core.Response testPattern(GrokPatternTestRequest request) -
createPattern
@POST @Timed public javax.ws.rs.core.Response createPattern(@Valid @NotNull @Valid @NotNull GrokPattern pattern) throws ValidationException - Throws:
ValidationException
-
bulkUpdatePatterns
@PUT @Timed public javax.ws.rs.core.Response bulkUpdatePatterns(@NotNull @NotNull GrokPatternList patternList, @Deprecated @QueryParam("replace") @DefaultValue("false") boolean deprecatedDropAllExisting, @QueryParam("import-strategy") GrokPatternService.ImportStrategy importStrategy) throws ValidationException - Throws:
ValidationException
-
bulkUpdatePatternsFromTextFile
@POST @Consumes("text/plain") @Timed public javax.ws.rs.core.Response bulkUpdatePatternsFromTextFile(@NotNull @NotNull InputStream patternsFile, @Deprecated @QueryParam("replace") @DefaultValue("false") boolean deprecatedDropAllExisting, @QueryParam("import-strategy") GrokPatternService.ImportStrategy importStrategy) throws ValidationException, IOException - Throws:
ValidationException
IOException
-
updatePattern
@PUT @Timed @Path("/{patternId}") public GrokPattern updatePattern(@PathParam("patternId") String patternId, GrokPattern pattern) throws ValidationException - Throws:
ValidationException
-
removePattern
@DELETE @Timed @Path("/{patternId}") public void removePattern(@PathParam("patternId") String patternId) throws NotFoundException - Throws:
NotFoundException
-