Class SidecarResource
java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog.plugins.sidecar.rest.resources.SidecarResource
- All Implemented Interfaces:
PluginRestResource
@Path("/sidecars")
@Consumes("application/json")
@Produces("application/json")
@RequiresAuthentication
public class SidecarResource
extends RestResource
implements PluginRestResource
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.google.common.collect.ImmutableMap<String,
SearchQueryField> Fields inherited from class org.graylog2.shared.rest.resources.RestResource
configuration, userService
-
Constructor Summary
ConstructorDescriptionSidecarResource
(SidecarService sidecarService, ActionService actionService, ClusterConfigService clusterConfigService, SidecarStatusMapper sidecarStatusMapper, EtagService etagService) -
Method Summary
Modifier and TypeMethodDescriptionall()
javax.ws.rs.core.Response
assignConfiguration
(@Valid @NotNull NodeConfigurationRequest request) javax.ws.rs.core.Response
register
(@NotEmpty String nodeId, @Valid @NotNull RegistrationRequest request, String ifNoneMatch, @NotEmpty String sidecarVersion) Methods inherited from class org.graylog2.shared.rest.resources.RestResource
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getIndexSet, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint
-
Field Details
-
SEARCH_FIELD_MAPPING
protected static final com.google.common.collect.ImmutableMap<String,SearchQueryField> SEARCH_FIELD_MAPPING
-
-
Constructor Details
-
SidecarResource
@Inject public SidecarResource(SidecarService sidecarService, ActionService actionService, ClusterConfigService clusterConfigService, SidecarStatusMapper sidecarStatusMapper, EtagService etagService)
-
-
Method Details
-
all
-
sidecars
@GET @Timed @RequiresPermissions("sidecars:read") public SidecarListResponse sidecars(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @QueryParam("query") @DefaultValue("") String query, @DefaultValue("node_name") @QueryParam("sort") String sort, @DefaultValue("asc") @QueryParam("order") String order, @QueryParam("only_active") @DefaultValue("false") boolean onlyActive) -
get
@GET @Timed @Path("/{sidecarId}") @RequiresPermissions("sidecars:read") public SidecarSummary get(@PathParam("sidecarId") @NotEmpty @NotEmpty String sidecarId) -
register
@PUT @Timed @Path("/{sidecarId}") @RequiresPermissions("sidecars:update") public javax.ws.rs.core.Response register(@PathParam("sidecarId") @NotEmpty @NotEmpty String nodeId, @Valid @NotNull @Valid @NotNull RegistrationRequest request, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("X-Graylog-Sidecar-Version") @NotEmpty @NotEmpty String sidecarVersion) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
assignConfiguration
@PUT @Timed @Path("/configurations") @RequiresPermissions({"sidecars:read","sidecars:update"}) public javax.ws.rs.core.Response assignConfiguration(@Valid @NotNull @Valid @NotNull NodeConfigurationRequest request) throws javax.ws.rs.NotFoundException - Throws:
javax.ws.rs.NotFoundException
-