Package org.apache.storm.daemon.ui.resources

## Class StormApiResource

- java.lang.Object
- - org.apache.storm.daemon.ui.resources.StormApiResource

-     @Path("/")
      public class StormApiResource
      extends Object

  Root resource (exposed at "storm" path).

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `callbackParameterName` |
    `static Map<String,​Object>` | `config` |
    `static org.slf4j.Logger` | `LOG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StormApiResource​(StormMetricsRegistry metricsRegistry)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `jakarta.ws.rs.core.Response` | `getClusterConfiguration​(String callback)` | /api/v1/cluster/configuration -> nimbus configuration.
    `jakarta.ws.rs.core.Response` | `getClusterSummary​(String callback)` | /api/v1/cluster/summary -> cluster summary.
    `jakarta.ws.rs.core.Response` | `getHistorySummary​(String callback)` | /api/v1/history/summary -> topo history.
    `jakarta.ws.rs.core.Response` | `getNimbusSummary​(String callback)` | /api/v1/nimbus/summary -> nimbus summary.
    `jakarta.ws.rs.core.Response` | `getOwnerResource​(String id, String callback)` | /api/v1/owner-resources/:id -> owner resources.
    `jakarta.ws.rs.core.Response` | `getOwnerResources​(String callback)` | /api/v1/owner-resources -> owner resources.
    `jakarta.ws.rs.core.Response` | `getSupervisor​(String id, String host, boolean sys, String callback)` | /api/v1/supervisor -> topo history.
    `jakarta.ws.rs.core.Response` | `getSupervisorSummary​(jakarta.ws.rs.core.SecurityContext securityContext, String callback)` | /api/v1/supervisor/summary -> supervisor summary.
    `jakarta.ws.rs.core.Response` | `getTopology​(String id, String window, boolean sys, String callback)` | /api/v1/topology -> topo.
    `jakarta.ws.rs.core.Response` | `getTopologyComponent​(String id, String component, boolean sys, String callback, String window)` | /api/v1/topology/:id/component/:component -> component.
    `jakarta.ws.rs.core.Response` | `getTopologyLag​(String id, String callback)` | /api/v1/topology/:id/lag -> lag.
    `jakarta.ws.rs.core.Response` | `getTopologyLogconfig​(String id, String callback)` | /api/v1/topology/:id/logconfig -> logconfig.
    `jakarta.ws.rs.core.Response` | `getTopologyMetrics​(String id, String window, boolean sys, String callback)` | /api/v1/topology/:id/metrics -> metrics.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingDumpheap​(String id, String hostPort, String callback)` | /api/v1/topology/:id/profiling/dumpheap/:host-port -> dump heap.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingDumpJstack​(String id, String hostPort, String callback)` | /api/v1/topology/:id/profiling/dumpjstack/:host-port -> dump jstack.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingDumpProfile​(String id, String hostPort, String callback)` | /api/v1/topology/:id/profiling/dumpprofile/:host-port -> dump profile.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingRestartWorker​(String id, String hostPort, String callback)` | /api/v1/topology/:id/profiling/restartworker/:host-port -> restart worker.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingStart​(String id, String hostPort, String timeout, String callback)` | /api/v1/topology/:id/profiling/start/:host-port/:timeout -> profiling start.
    `jakarta.ws.rs.core.Response` | `getTopologyProfilingStop​(String id, String hostPort, String callback)` | /api/v1/topology/:id/profiling/stop/:host-port -> profiling stop.
    `jakarta.ws.rs.core.Response` | `getTopologySummary​(jakarta.ws.rs.core.SecurityContext securityContext, String callback)` | /api/v1/topology/summary -> topo history.
    `jakarta.ws.rs.core.Response` | `getTopologyVisializationInit​(String id, boolean sys, String callback, String window)` | /api/v1/topology/:id/visualization-init -> visualization-init.
    `jakarta.ws.rs.core.Response` | `getTopologyVisualization​(String id, boolean sys, String callback, String window)` | /api/v1/topology/:id/visualization -> visualization.
    `jakarta.ws.rs.core.Response` | `getTopologyWorkers​(String id, String callback)` | /api/v1/topology-workers/:id -> topo workers.
    `jakarta.ws.rs.core.Response` | `putTopologyActivate​(String id, String callback)` | /api/v1/topology/:id/activate -> topology activate.
    `jakarta.ws.rs.core.Response` | `putTopologyComponentDebugActionSpct​(String id, String component, String action, String spct, String callback)` | /api/v1/topology/:id/component/:component/debug/:action/:spct -> debug component action.
    `jakarta.ws.rs.core.Response` | `putTopologyDeactivate​(String id, String callback)` | /api/v1/topology/:id/deactivate -> topology deactivate.
    `jakarta.ws.rs.core.Response` | `putTopologyDebugActionSpct​(String id, String action, String spct, String callback)` | /api/v1/topology/:id/debug/:action/:spct -> debug action.
    `jakarta.ws.rs.core.Response` | `putTopologyKill​(String id, String waitTime, String callback)` | /api/v1/topology/:id/kill/:wait-time -> topology kill.
    `jakarta.ws.rs.core.Response` | `putTopologyLogconfig​(String id, String body, String callback)` | /api/v1/topology/:id/logconfig -> logconfig.
    `jakarta.ws.rs.core.Response` | `putTopologyRebalance​(String id, String waitTime, String callback)` | /api/v1/topology/:id/rebalance/:wait-time -> topology rebalance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LOG

          public static final org.slf4j.Logger LOG

    - #### callbackParameterName

          public static final String callbackParameterName

      See Also:
        Constant Field Values

    - #### config

          public static Map<String,​Object> config

  - ### Constructor Detail

    - #### StormApiResource

          @Inject
          public StormApiResource​(StormMetricsRegistry metricsRegistry)

  - ### Method Detail

    - #### getClusterConfiguration

          @GET
          @Path("/cluster/configuration")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getClusterConfiguration​(@QueryParam("callback")
                                                                     String callback)
                                                              throws org.apache.storm.thrift.TException

      /api/v1/cluster/configuration -> nimbus configuration.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getClusterSummary

          @GET
          @Path("/cluster/summary")
          @AuthNimbusOp("getClusterInfo")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getClusterSummary​(@QueryParam("callback")
                                                               String callback)
                                                        throws org.apache.storm.thrift.TException

      /api/v1/cluster/summary -> cluster summary.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getNimbusSummary

          @GET
          @Path("/nimbus/summary")
          @AuthNimbusOp("getClusterInfo")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getNimbusSummary​(@QueryParam("callback")
                                                              String callback)
                                                       throws org.apache.storm.thrift.TException

      /api/v1/nimbus/summary -> nimbus summary.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getOwnerResources

          @GET
          @Path("/owner-resources")
          @AuthNimbusOp("getOwnerResourceSummaries")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getOwnerResources​(@QueryParam("callback")
                                                               String callback)
                                                        throws org.apache.storm.thrift.TException

      /api/v1/owner-resources -> owner resources.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getOwnerResource

          @GET
          @Path("/owner-resources/{id}")
          @AuthNimbusOp("getOwnerResourceSummaries")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getOwnerResource​(@PathParam("id")
                                                              String id,
                                                              @QueryParam("callback")
                                                              String callback)
                                                       throws org.apache.storm.thrift.TException

      /api/v1/owner-resources/:id -> owner resources.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getHistorySummary

          @GET
          @Path("/history/summary")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getHistorySummary​(@QueryParam("callback")
                                                               String callback)
                                                        throws org.apache.storm.thrift.TException

      /api/v1/history/summary -> topo history.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getSupervisorSummary

          @GET
          @Path("/supervisor/summary")
          @AuthNimbusOp("getClusterInfo")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getSupervisorSummary​(@Context
                                                                  jakarta.ws.rs.core.SecurityContext securityContext,
                                                                  @QueryParam("callback")
                                                                  String callback)
                                                           throws org.apache.storm.thrift.TException

      /api/v1/supervisor/summary -> supervisor summary.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getSupervisor

          @GET
          @Path("/supervisor")
          @AuthNimbusOp("getSupervisorPageInfo")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getSupervisor​(@QueryParam("id")
                                                           String id,
                                                           @QueryParam("host")
                                                           String host,
                                                           @QueryParam("sys")
                                                           boolean sys,
                                                           @QueryParam("callback")
                                                           String callback)
                                                    throws org.apache.storm.thrift.TException

      /api/v1/supervisor -> topo history.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologySummary

          @GET
          @Path("/topology/summary")
          @AuthNimbusOp("getClusterInfo")
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologySummary​(@Context
                                                                jakarta.ws.rs.core.SecurityContext securityContext,
                                                                @QueryParam("callback")
                                                                String callback)
                                                         throws org.apache.storm.thrift.TException

      /api/v1/topology/summary -> topo history.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopology

          @GET
          @Path("/topology/{id}")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopology​(@PathParam("id")
                                                         String id,
                                                         @DefaultValue(":all-time") @QueryParam("window")
                                                         String window,
                                                         @QueryParam("sys")
                                                         boolean sys,
                                                         @QueryParam("callback")
                                                         String callback)
                                                  throws org.apache.storm.thrift.TException

      /api/v1/topology -> topo.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyWorkers

          @GET
          @Path("/topology-workers/{id}")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyWorkers​(@PathParam("id")
                                                                String id,
                                                                @QueryParam("callback")
                                                                String callback)
                                                         throws org.apache.storm.thrift.TException

      /api/v1/topology-workers/:id -> topo workers.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyMetrics

          @GET
          @Path("/topology/{id}/metrics")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyMetrics​(@PathParam("id")
                                                                String id,
                                                                @DefaultValue(":all-time") @QueryParam("window")
                                                                String window,
                                                                @QueryParam("sys")
                                                                boolean sys,
                                                                @QueryParam("callback")
                                                                String callback)
                                                         throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/metrics -> metrics.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyLag

          @GET
          @Path("/topology/{id}/lag")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyLag​(@PathParam("id")
                                                            String id,
                                                            @QueryParam("callback")
                                                            String callback)
                                                     throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/lag -> lag.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyVisializationInit

          @GET
          @Path("/topology/{id}/visualization-init")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyVisializationInit​(@PathParam("id")
                                                                          String id,
                                                                          @QueryParam("sys")
                                                                          boolean sys,
                                                                          @QueryParam("callback")
                                                                          String callback,
                                                                          @DefaultValue(":all-time") @QueryParam("window")
                                                                          String window)
                                                                   throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/visualization-init -> visualization-init.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyVisualization

          @GET
          @Path("/topology/{id}/visualization")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyVisualization​(@PathParam("id")
                                                                      String id,
                                                                      @QueryParam("sys")
                                                                      boolean sys,
                                                                      @QueryParam("callback")
                                                                      String callback,
                                                                      @DefaultValue(":all-time") @QueryParam("window")
                                                                      String window)
                                                               throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/visualization -> visualization.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyComponent

          @GET
          @Path("/topology/{id}/component/{component}")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyComponent​(@PathParam("id")
                                                                  String id,
                                                                  @PathParam("component")
                                                                  String component,
                                                                  @QueryParam("sys")
                                                                  boolean sys,
                                                                  @QueryParam("callback")
                                                                  String callback,
                                                                  @DefaultValue(":all-time") @QueryParam("window")
                                                                  String window)
                                                           throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/component/:component -> component.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyLogconfig

          @GET
          @Path("/topology/{id}/logconfig")
          @AuthNimbusOp(value="getTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyLogconfig​(@PathParam("id")
                                                                  String id,
                                                                  @QueryParam("callback")
                                                                  String callback)
                                                           throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/logconfig -> logconfig.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyLogconfig

          @POST
          @Path("/topology/{id}/logconfig")
          @AuthNimbusOp(value="setLogConfig",
                        needsTopoId=true)
          @Produces("application/json")
          @Consumes("application/json")
          public jakarta.ws.rs.core.Response putTopologyLogconfig​(@PathParam("id")
                                                                  String id,
                                                                  String body,
                                                                  @QueryParam("callback")
                                                                  String callback)
                                                           throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/logconfig -> logconfig.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyActivate

          @POST
          @Path("/topology/{id}/activate")
          @AuthNimbusOp(value="activate",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyActivate​(@PathParam("id")
                                                                 String id,
                                                                 @QueryParam("callback")
                                                                 String callback)
                                                          throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/activate -> topology activate.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyDeactivate

          @POST
          @Path("/topology/{id}/deactivate")
          @AuthNimbusOp(value="deactivate",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyDeactivate​(@PathParam("id")
                                                                   String id,
                                                                   @QueryParam("callback")
                                                                   String callback)
                                                            throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/deactivate -> topology deactivate.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyDebugActionSpct

          @POST
          @Path("/topology/{id}/debug/{action}/{spct}")
          @AuthNimbusOp(value="debug",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyDebugActionSpct​(@PathParam("id")
                                                                        String id,
                                                                        @PathParam("action")
                                                                        String action,
                                                                        @PathParam("spct")
                                                                        String spct,
                                                                        @QueryParam("callback")
                                                                        String callback)
                                                                 throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/debug/:action/:spct -> debug action.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyComponentDebugActionSpct

          @POST
          @Path("/topology/{id}/component/{component}/debug/{action}/{spct}")
          @AuthNimbusOp(value="debug",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyComponentDebugActionSpct​(@PathParam("id")
                                                                                 String id,
                                                                                 @PathParam("component")
                                                                                 String component,
                                                                                 @PathParam("action")
                                                                                 String action,
                                                                                 @PathParam("spct")
                                                                                 String spct,
                                                                                 @QueryParam("callback")
                                                                                 String callback)
                                                                          throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/component/:component/debug/:action/:spct -> debug component action.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyRebalance

          @POST
          @Path("/topology/{id}/rebalance/{wait-time}")
          @AuthNimbusOp(value="rebalance",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyRebalance​(@PathParam("id")
                                                                  String id,
                                                                  @PathParam("wait-time")
                                                                  String waitTime,
                                                                  @QueryParam("callback")
                                                                  String callback)
                                                           throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/rebalance/:wait-time -> topology rebalance.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### putTopologyKill

          @POST
          @Path("/topology/{id}/kill/{wait-time}")
          @AuthNimbusOp(value="killTopology",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response putTopologyKill​(@PathParam("id")
                                                             String id,
                                                             @PathParam("wait-time")
                                                             String waitTime,
                                                             @QueryParam("callback")
                                                             String callback)
                                                      throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/kill/:wait-time -> topology kill.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingStart

          @GET
          @Path("/topology/{id}/profiling/start/{host-port}/{timeout}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingStart​(@PathParam("id")
                                                                       String id,
                                                                       @PathParam("host-port")
                                                                       String hostPort,
                                                                       @PathParam("timeout")
                                                                       String timeout,
                                                                       @QueryParam("callback")
                                                                       String callback)
                                                                throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/start/:host-port/:timeout -> profiling start.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingStop

          @GET
          @Path("/topology/{id}/profiling/stop/{host-port}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingStop​(@PathParam("id")
                                                                      String id,
                                                                      @PathParam("host-port")
                                                                      String hostPort,
                                                                      @QueryParam("callback")
                                                                      String callback)
                                                               throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/stop/:host-port -> profiling stop.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingDumpProfile

          @GET
          @Path("/topology/{id}/profiling/dumpprofile/{host-port}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingDumpProfile​(@PathParam("id")
                                                                             String id,
                                                                             @PathParam("host-port")
                                                                             String hostPort,
                                                                             @QueryParam("callback")
                                                                             String callback)
                                                                      throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/dumpprofile/:host-port -> dump profile.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingDumpJstack

          @GET
          @Path("/topology/{id}/profiling/dumpjstack/{host-port}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingDumpJstack​(@PathParam("id")
                                                                            String id,
                                                                            @PathParam("host-port")
                                                                            String hostPort,
                                                                            @QueryParam("callback")
                                                                            String callback)
                                                                     throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/dumpjstack/:host-port -> dump jstack.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingRestartWorker

          @GET
          @Path("/topology/{id}/profiling/restartworker/{host-port}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingRestartWorker​(@PathParam("id")
                                                                               String id,
                                                                               @PathParam("host-port")
                                                                               String hostPort,
                                                                               @QueryParam("callback")
                                                                               String callback)
                                                                        throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/restartworker/:host-port -> restart worker.
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyProfilingDumpheap

          @GET
          @Path("/topology/{id}/profiling/dumpheap/{host-port}")
          @AuthNimbusOp(value="setWorkerProfiler",
                        needsTopoId=true)
          @Produces("application/json")
          public jakarta.ws.rs.core.Response getTopologyProfilingDumpheap​(@PathParam("id")
                                                                          String id,
                                                                          @PathParam("host-port")
                                                                          String hostPort,
                                                                          @QueryParam("callback")
                                                                          String callback)
                                                                   throws org.apache.storm.thrift.TException

      /api/v1/topology/:id/profiling/dumpheap/:host-port -> dump heap.
      Throws:
        `org.apache.storm.thrift.TException`