@Path(value="/system/pipelines/rule") @Consumes(value="application/json") @Produces(value="application/json") public class RuleResource extends RestResource implements PluginRestResource
configuration, userService| Constructor and Description |
|---|
RuleResource(RuleService ruleService,
PipelineService pipelineService,
RuleMetricsConfigService ruleMetricsConfigService,
PipelineRuleParser pipelineRuleParser,
PaginatedRuleService paginatedRuleService,
FunctionRegistry functionRegistry,
PipelineServiceHelper pipelineServiceHelper) |
| Modifier and Type | Method and Description |
|---|---|
RuleSource |
createFromParser(@NotNull RuleSource ruleSource) |
void |
delete(String id) |
Collection<Object> |
functionDescriptors() |
RuleSource |
get(String id) |
Collection<RuleSource> |
getAll() |
Collection<RuleSource> |
getBulk(BulkRuleRequest rules) |
PaginatedResponse<RuleSource> |
getPage(int page,
int perPage,
String query,
String sort,
String order) |
RuleMetricsConfigDto |
metricsConfig() |
RuleSource |
parse(@NotNull RuleSource ruleSource) |
RuleSource |
update(String id,
@NotNull RuleSource update) |
RuleMetricsConfigDto |
updateMetricsConfig(RuleMetricsConfigDto config) |
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint@Inject public RuleResource(RuleService ruleService, PipelineService pipelineService, RuleMetricsConfigService ruleMetricsConfigService, PipelineRuleParser pipelineRuleParser, PaginatedRuleService paginatedRuleService, FunctionRegistry functionRegistry, PipelineServiceHelper pipelineServiceHelper)
@POST public RuleSource createFromParser(@NotNull @NotNull RuleSource ruleSource) throws ParseException
ParseException@POST @Path(value="/parse") public RuleSource parse(@NotNull @NotNull RuleSource ruleSource) throws ParseException
ParseException@GET public Collection<RuleSource> getAll()
@GET @Path(value="/paginated") @Produces(value="application/json") public PaginatedResponse<RuleSource> getPage(@QueryParam(value="page") @DefaultValue(value="1") int page, @QueryParam(value="per_page") @DefaultValue(value="50") int perPage, @QueryParam(value="query") @DefaultValue(value="") String query, @DefaultValue(value="title") @QueryParam(value="sort") String sort, @DefaultValue(value="asc") @QueryParam(value="order") String order)
@Path(value="/{id}")
@GET
public RuleSource get(@PathParam(value="id")
String id)
throws NotFoundException
NotFoundException@Path(value="/multiple") @POST public Collection<RuleSource> getBulk(BulkRuleRequest rules)
@Path(value="/{id}")
@PUT
public RuleSource update(@PathParam(value="id")
String id,
@NotNull
@NotNull RuleSource update)
throws NotFoundException
NotFoundException@Path(value="/{id}")
@DELETE
public void delete(@PathParam(value="id")
String id)
throws NotFoundException
NotFoundException@Path(value="/functions") @GET public Collection<Object> functionDescriptors()
@Path(value="/config/metrics") @GET public RuleMetricsConfigDto metricsConfig()
@Path(value="/config/metrics") @PUT public RuleMetricsConfigDto updateMetricsConfig(RuleMetricsConfigDto config)
Copyright © 2012–2022 Graylog, Inc.. All rights reserved.