Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-361

Add JSON-P support to Storm UI API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.9.2-incubating
    • 0.9.3
    • storm-core

    Description

      The recent API that is being released in Storm UI with 0.9.2 is great, but it'd be useful if the API supported an optional ?callback parameter that would provide a wrapped JSON-P response for all endpoints.

      Example:

      GET https://my-storm-head.cogtree.com/api/v1/cluster/summary?callback=myFunction
      
      myFunction({"stormVersion":"0.9.2-incubating","nimbusUptime":"4m 55s","supervisors":2,"slotsTotal":32,"slotsUsed":0,"slotsFree":32,"executorsTotal":0,"tasksTotal":0});
      

      This would allow users to write clients similar to elasticsearch-head (which I was hoping to build) where they could use a single UI to manage multiple Storm environments.

      Having a JSON-P ?callback param would allow clients to get around browsers enforcing same-origin policies.

      The JSON-P site has examples of valid callback parameters:

      functionName({JSON});
      
      obj.functionName({JSON});
      
      obj["function-name"]({JSON});
      

      Attachments

        Activity

          People

            sriharsha Harsha
            msukmanowsky Mike Sukmanowsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: