@Path(value="/views") @Produces(value="application/json") public class ViewsResource extends RestResource implements PluginRestResource
userService
Constructor and Description |
---|
ViewsResource(ViewService dbService,
ViewSharingService viewSharingService,
IsViewSharedForUser isViewSharedForUser) |
Modifier and Type | Method and Description |
---|---|
ViewDTO |
create(@Valid ViewDTO dto) |
ViewDTO |
delete(@NotEmpty String id) |
ViewDTO |
get(@NotEmpty String id) |
void |
setDefault(@NotEmpty String id) |
ViewDTO |
update(@NotEmpty String id,
@Valid ViewDTO dto) |
PaginatedResponse<ViewDTO> |
views(int page,
int perPage,
String sortField,
String order,
String query) |
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint
@Inject public ViewsResource(ViewService dbService, ViewSharingService viewSharingService, IsViewSharedForUser isViewSharedForUser)
@GET public PaginatedResponse<ViewDTO> views(@QueryParam(value="page") @DefaultValue(value="1") int page, @QueryParam(value="per_page") @DefaultValue(value="50") int perPage, @DefaultValue(value="title") @QueryParam(value="sort") String sortField, @DefaultValue(value="asc") @QueryParam(value="order") String order, @QueryParam(value="query") String query)
@GET @Path(value="{id}") public ViewDTO get(@PathParam(value="id") @NotEmpty @NotEmpty String id)
@POST public ViewDTO create(@Valid @Valid ViewDTO dto) throws ValidationException
ValidationException
@PUT @Path(value="{id}") public ViewDTO update(@PathParam(value="id") @NotEmpty @NotEmpty String id, @Valid @Valid ViewDTO dto)
@PUT @Path(value="{id}/default") public void setDefault(@PathParam(value="id") @NotEmpty @NotEmpty String id)
Copyright © 2012–2019 Graylog, Inc.. All rights reserved.