Class EventDefinitionsResource

java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog.events.rest.EventDefinitionsResource
All Implemented Interfaces:
PluginRestResource

@Path("/events/definitions") @Produces("application/json") @Consumes("application/json") public class EventDefinitionsResource extends RestResource implements PluginRestResource
  • Constructor Details

  • Method Details

    • list

      @GET public PaginatedResponse<EventDefinitionDto> list(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @QueryParam("query") @DefaultValue("") String query)
    • get

      @GET @Path("{definitionId}") public EventDefinitionDto get(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • getWithContext

      @GET @Path("{definitionId}/with-context") public Map<String,Object> getWithContext(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • create

      @POST @Produces("application/json") public javax.ws.rs.core.Response create(@QueryParam("schedule") @DefaultValue("true") boolean schedule, EventDefinitionDto dto, @Context UserContext userContext)
    • update

      @PUT @Path("{definitionId}") public javax.ws.rs.core.Response update(@PathParam("definitionId") @NotBlank @NotBlank String definitionId, @QueryParam("schedule") @DefaultValue("true") boolean schedule, EventDefinitionDto dto)
    • delete

      @DELETE @Path("{definitionId}") public void delete(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • schedule

      @PUT @Path("{definitionId}/schedule") @Consumes("*/*") public void schedule(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • unschedule

      @PUT @Path("{definitionId}/unschedule") @Consumes("*/*") public void unschedule(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • clearNotificationQueue

      @PUT @Path("{definitionId}/clear-notification-queue") @Consumes("*/*") public void clearNotificationQueue(@PathParam("definitionId") @NotBlank @NotBlank String definitionId)
    • execute

      @POST @Path("{definitionId}/execute") public void execute(@PathParam("definitionId") @NotBlank @NotBlank String definitionId, @NotNull @NotNull EventProcessorParameters parameters)
    • validate

      @POST @Path("/validate") public ValidationResult validate(@Valid @NotNull @Valid @NotNull EventDefinitionDto toValidate)