Class LookupTableResource

java.lang.Object
org.graylog2.shared.rest.resources.RestResource
org.graylog2.rest.resources.system.lookup.LookupTableResource

@RequiresAuthentication @Path("/system/lookup") @Produces("application/json") @Consumes("application/json") public class LookupTableResource extends RestResource
  • Constructor Details

  • Method Details

    • performLookup

      @GET @Path("tables/{name}/query") @RequiresPermissions("lookuptables:read") public LookupResult performLookup(@PathParam("name") @NotEmpty @NotEmpty String name, @QueryParam("key") @NotEmpty @NotEmpty String key)
    • performPurge

      @POST @Path("tables/{idOrName}/purge") @RequiresPermissions("lookuptables:read") public void performPurge(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName, @QueryParam("key") String key)
      NOTE: Must NOT be called directly by clients. Consider calling ClusterLookupTableResource.performPurge(String, String) instead!
    • tables

      @GET @Path("tables") @RequiresPermissions("lookuptables:read") public LookupTableResource.LookupTablePage tables(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @DefaultValue("title") @QueryParam("sort") String sort, @DefaultValue("desc") @QueryParam("order") String order, @QueryParam("query") String query, @QueryParam("resolve") @DefaultValue("false") boolean resolveObjects)
    • get

      @GET @Path("tables/{idOrName}") public LookupTableResource.LookupTablePage get(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName, @QueryParam("resolve") @DefaultValue("false") boolean resolveObjects)
    • createTable

      @POST @Path("tables") @RequiresPermissions("lookuptables:create") public LookupTableApi createTable(LookupTableApi lookupTable)
    • updateTable

      @PUT @Path("tables/{idOrName}") public LookupTableApi updateTable(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName, @Valid @Valid LookupTableApi toUpdate)
    • removeTable

      @DELETE @Path("tables/{idOrName}") public LookupTableApi removeTable(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName)
    • validateTable

      @POST @Path("tables/validate") @RequiresPermissions("lookuptables:read") public ValidationResult validateTable(LookupTableApi toValidate)
    • adapters

      @GET @Path("adapters") @RequiresPermissions("lookuptables:read") public LookupTableResource.DataAdapterPage adapters(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @DefaultValue("title") @QueryParam("sort") String sort, @DefaultValue("desc") @QueryParam("order") String order, @QueryParam("query") String query)
    • availableAdapterTypes

      @GET @Path("types/adapters") @RequiresPermissions("lookuptables:read") public Map<String,LookupDataAdapter.Descriptor> availableAdapterTypes()
    • errorStates

      @POST @Path("errorstates") @RequiresPermissions("lookuptables:read") public ErrorStates errorStates(@Valid @Valid ErrorStatesRequest request)
    • getAdapter

      @GET @Path("adapters/{idOrName}") public DataAdapterApi getAdapter(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName)
    • performAdapterLookup

      @GET @Path("adapters/{name}/query") @RequiresPermissions("lookuptables:read") public LookupResult performAdapterLookup(@PathParam("name") @NotEmpty @NotEmpty String name, @QueryParam("key") @NotEmpty @NotEmpty String key)
    • createAdapter

      @POST @Path("adapters") @RequiresPermissions("lookuptables:create") public DataAdapterApi createAdapter(@Valid @Valid DataAdapterApi newAdapter)
    • deleteAdapter

      @DELETE @Path("adapters/{idOrName}") public DataAdapterApi deleteAdapter(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName)
    • updateAdapter

      @PUT @Path("adapters/{idOrName}") public DataAdapterApi updateAdapter(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName, @Valid @Valid DataAdapterApi toUpdate)
    • validateAdapter

      @POST @Path("adapters/validate") @RequiresPermissions("lookuptables:read") public ValidationResult validateAdapter(DataAdapterApi toValidate)
    • caches

      @GET @Path("caches") @RequiresPermissions("lookuptables:read") public LookupTableResource.CachesPage caches(@QueryParam("page") @DefaultValue("1") int page, @QueryParam("per_page") @DefaultValue("50") int perPage, @DefaultValue("title") @QueryParam("sort") String sort, @DefaultValue("desc") @QueryParam("order") String order, @QueryParam("query") String query)
    • availableCacheTypes

      @GET @Path("types/caches") @RequiresPermissions("lookuptables:read") public Map<String,LookupCache.Descriptor> availableCacheTypes()
    • getCache

      @GET @Path("caches/{idOrName}") public CacheApi getCache(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName)
    • createCache

      @POST @Path("caches") @RequiresPermissions("lookuptables:create") public CacheApi createCache(CacheApi newCache)
    • deleteCache

      @DELETE @Path("caches/{idOrName}") public CacheApi deleteCache(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName)
    • updateCache

      @PUT @Path("caches/{idOrName}") public CacheApi updateCache(@PathParam("idOrName") @NotEmpty @NotEmpty String idOrName, CacheApi toUpdate)
    • validateCache

      @POST @Path("caches/validate") @RequiresPermissions("lookuptables:read") public ValidationResult validateCache(CacheApi toValidate)