Class FavoritesResource
java.lang.Object
org.graylog.plugins.views.favorites.FavoritesResource
@Path("/favorites")
@Produces("application/json")
@RequiresAuthentication
public class FavoritesResource
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItemToFavorites
(@NotEmpty String grn, SearchUser searchUser) getFavoriteItems
(int page, int perPage, Optional<String> type, SearchUser searchUser) void
removeItemFromFavorites
(@NotEmpty String grn, SearchUser searchUser)
-
Constructor Details
-
FavoritesResource
-
-
Method Details
-
getFavoriteItems
@GET public PaginatedResponse<Favorite> getFavoriteItems(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("5") int perPage, @QueryParam("type") Optional<String> type, @Context SearchUser searchUser) -
addItemToFavorites
@PUT @Path("/{grn}") public void addItemToFavorites(@PathParam("grn") @NotEmpty @NotEmpty String grn, @Context SearchUser searchUser) -
removeItemFromFavorites
@DELETE @Path("/{grn}") public void removeItemFromFavorites(@PathParam("grn") @NotEmpty @NotEmpty String grn, @Context SearchUser searchUser)
-