Package org.graylog.events.rest
Class EventNotificationsResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog.events.rest.EventNotificationsResource
- All Implemented Interfaces:
PluginRestResource
@Path("/events/notifications")
@Produces("application/json")
@Consumes("application/json")
public class EventNotificationsResource
extends RestResource
implements PluginRestResource
-
Field Summary
Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorDescriptionEventNotificationsResource
(DBNotificationService dbNotificationService, Set<AlarmCallback> availableLegacyAlarmCallbacks, NotificationResourceHandler resourceHandler, EmailConfiguration emailConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
create
(NotificationDto dto, UserContext userContext) void
javax.ws.rs.core.Response
listNotifications
(int page, int perPage, String query) javax.ws.rs.core.Response
javax.ws.rs.core.Response
test
(NotificationDto dto) javax.ws.rs.core.Response
update
(@NotBlank String notificationId, NotificationDto dto) Methods inherited from class org.graylog2.shared.rest.resources.RestResource
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint
-
Constructor Details
-
EventNotificationsResource
@Inject public EventNotificationsResource(DBNotificationService dbNotificationService, Set<AlarmCallback> availableLegacyAlarmCallbacks, NotificationResourceHandler resourceHandler, EmailConfiguration emailConfiguration)
-
-
Method Details
-
listNotifications
@GET public PaginatedResponse<NotificationDto> listNotifications(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @QueryParam("query") @DefaultValue("") String query) -
get
@GET @Path("/{notificationId}") public NotificationDto get(@PathParam("notificationId") @NotBlank @NotBlank String notificationId) -
create
@POST public javax.ws.rs.core.Response create(NotificationDto dto, @Context UserContext userContext) -
update
@PUT @Path("/{notificationId}") public javax.ws.rs.core.Response update(@PathParam("notificationId") @NotBlank @NotBlank String notificationId, NotificationDto dto) -
delete
@DELETE @Path("/{notificationId}") public void delete(@PathParam("notificationId") @NotBlank @NotBlank String notificationId) -
test
@POST @Timed @Path("/{notificationId}/test") public javax.ws.rs.core.Response test(@PathParam("notificationId") @NotBlank @NotBlank String notificationId) -
test
-
legacyTypes
@GET @Path("/legacy/types") public javax.ws.rs.core.Response legacyTypes()
-