Class StorageResources

java.lang.Object
org.apache.drill.exec.server.rest.StorageResources

@Path("/") @RolesAllowed("admin") public class StorageResources extends Object
  • Constructor Details

    • StorageResources

      public StorageResources()
  • Method Details

    • getConfigsFor

      @GET @Path("/storage/{group}/plugins/export{format: (/[^/]+?)*}") @Produces("application/json") public javax.ws.rs.core.Response getConfigsFor(@PathParam("group") String pluginGroup, @PathParam("format") String format)
      Regex allows the following paths:
      
       /storage/{group}/plugins/export
       /storage/{group}/plugins/export/{format}

      Note: for the second case the format involves the leading slash, therefore it should be removed then

    • getPluginsJSON

      @GET @Path("/storage.json") @Produces("application/json") public List<PluginConfigWrapper> getPluginsJSON()
    • getPlugins

      @GET @Path("/storage") @Produces("text/html") public org.glassfish.jersey.server.mvc.Viewable getPlugins()
    • getPluginConfig

      @GET @Path("/storage/{name}.json") @Produces("application/json") public javax.ws.rs.core.Response getPluginConfig(@PathParam("name") String name)
    • getPlugin

      @GET @Path("/storage/{name}") @Produces("text/html") public org.glassfish.jersey.server.mvc.Viewable getPlugin(@PathParam("name") String name)
    • enablePlugin

      @POST @Path("/storage/{name}/enable/{val}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response enablePlugin(@PathParam("name") String name, @PathParam("val") Boolean enable)
    • updateRefreshToken

      @POST @Path("/storage/{name}/update_refresh_token") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response updateRefreshToken(@PathParam("name") String name, OAuthTokenContainer tokens)
      Deprecated.
    • updateAccessToken

      @POST @Path("/storage/{name}/update_access_token") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response updateAccessToken(@PathParam("name") String name, OAuthTokenContainer tokens)
      Deprecated.
    • updateOAuthTokens

      @POST @Path("/storage/{name}/update_oauth_tokens") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response updateOAuthTokens(@PathParam("name") String name, OAuthTokenContainer tokenContainer)
      Deprecated.
    • updateAuthToken

      @GET @Path("/storage/{name}/update_oauth2_authtoken") @Produces("text/html") @Deprecated public javax.ws.rs.core.Response updateAuthToken(@PathParam("name") String name, @QueryParam("code") String code)
      Deprecated.
    • enablePluginViaGet

      @GET @Path("/storage/{name}/enable/{val}") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response enablePluginViaGet(@PathParam("name") String name, @PathParam("val") Boolean enable)
      Deprecated.
      use the method with POST request enablePlugin(java.lang.String, java.lang.Boolean) instead
    • exportPlugin

      @GET @Path("/storage/{name}/export{format: (/[^/]+?)*}") @Produces("application/json") public javax.ws.rs.core.Response exportPlugin(@PathParam("name") String name, @PathParam("format") String format)
      Regex allows the following paths: /storage/{name}/export "/storage/{name}/export/{format} Note: for the second case the format involves the leading slash, therefore it should be removed then
    • deletePlugin

      @DELETE @Path("/storage/{name}.json") @Produces("application/json") public javax.ws.rs.core.Response deletePlugin(@PathParam("name") String name)
    • createOrUpdatePluginJSON

      @POST @Path("/storage/{name}.json") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response createOrUpdatePluginJSON(PluginConfigWrapper plugin)
    • createOrUpdatePlugin

      @POST @Path("/storage/create_update") @Consumes("application/x-www-form-urlencoded") @Produces("application/json") public javax.ws.rs.core.Response createOrUpdatePlugin(@FormParam("name") String name, @FormParam("config") String storagePluginConfig)
    • getConfigsFor

      @GET @Path("/storage{group: (/[^/]+?)*}-plugins.json") @Produces("application/json") public List<PluginConfigWrapper> getConfigsFor(@PathParam("group") String pluginGroup)
      Regex allows the following paths:
      
       /storage.json
       /storage/{group}-plugins.json
      Allowable groups:
      • "all" ALL_PLUGINS
      • "enabled" ENABLED_PLUGINS
      • "disabled" DISABLED_PLUGINS
      Any other group value results in an empty list.

      Note: for the second case the group involves the leading slash, therefore it should be removed then

    • createOrUpdatePlugin

      @POST @Path("/storage/{name}") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response createOrUpdatePlugin(PluginConfigWrapper plugin)
    • deletePluginViaGet

      @GET @Path("/storage/{name}/delete") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response deletePluginViaGet(@PathParam("name") String name)
      Deprecated.
      use the method with DELETE request deletePlugin(String) instead