RESTful API - Server Management - Storm Streaming Server

This section describes Storm’s RESTful API regarding server basic functionality and information.

Server Version and Branch

Request type GET
URL /rest-api/server/info
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "storm":{
         "version":"2.0.0",
         "branch":"main",
         "protocolRev":2
      },
      "software":{
         "osName":"Mac OS X",
         "osVersion":"13.2",
         "osArch":"aarch64",
         "javaVendor":"Oracle Corporation",
         "javaVersion":"19.0.2+7-44"
      },
      "hardware":{
         "cpuCount":12,
         "totalMemory":103079215104
      }
   }
}
                                        
Table 1. Server version and branch table.

Field explanation:

storm:version Storm’s current version
strom:branch Code branch, usually “main”, unless code for compiled for specific environment or client.
storm:protocol_rev Specifies required protocol version for web video player.
software:osName Operating system name.
software:osVersion Operating system version.
software:osArch Operating system architecture.
hardware:cpuCount Number of cores for the processor (including virtual cores).
hardware:totalMemory Total memory size for this machine in bytes.
Table 2. Server version and branch fields table.

Server Status

Request type GET
URL /rest-api/server
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "status":"running",
      "startDate":1685397038
   }
}
                                        
Table 3. Server status table

Field explanation:

status Storm’s status. Possible values: “running”, “closing”, “error”.
startDate Exact start time in Unix time.
Table 4. Server status fields table.

Shutting Server Down

Request type PUT
Request Data

{
   "command":"shutdown"
}
                                        
URL /rest-api/server
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "command":"shutdown"
   }
}
                                        
Table 5. Shutting server down table.

Field explanation:

command Repeats command from Request Data.
Table 6. Shutting server down fields table.

Restarting Server

Request type PUT
Request Data

{
   "command":"restart"
}
                                        
URL /rest-api/server
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "command":"restart"
   }
}
                                        
Table 7. Restarting server table.

Field explanation:

command Repeats command from Request Data.
Table 8. Restarting server fields table.

Server CPU/Memory Usage

Request type GET
URL /rest-api/server/usage
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "CPULoad":0.051,
      "totalAllocatedMemory":25426441,
      "totalUsedMemory":12283511,
      "threadpools":[
         {
            "threadPoolName":"reader",
            "activeThreads":10,
            "totalThreads":100,
            "awaitingTasks":0,
            "tasksPerSecond":10
         },
         {
            "threadPoolName":"writer",
            "activeThreads":10,
            "totalThreads":100,
            "awaitingTasks":0,
            "tasksPerSecond":15
         },
         {
            "threadPoolName":"worker",
            "activeThreads":5,
            "totalThreads":50,
            "awaitingTasks":0,
            "tasksPerSecond":140
         },
         {
            "threadPoolName":"transport",
            "activeThreads":5,
            "totalThreads":30,
            "awaitingTasks":0,
            "tasksPerSecond":30
         }
      ]
   }
}
                                        
Table 9. Server CPU/memory usage table.

Field explanation:

CPULoad Current CPU load in precents. Value 1.0 means 100% of all CPUs.
totalAllocatedMemory Total amount of memory allocated by the server.
totalUsedMemory Amount of memory being used by the server.
threadPoolName Name of a specific thread-pool.
activeThreads Number of threads performing tasks.
totalThreads Total number of threads in this thread-pool.
awaitingTasks Number of tasks awaiting to be performed by threads in this pool.
tasksPerSecond Number of tasks performed per second.
Table 10. Server CPU/memory usage fields table.

Server License

Request type GET
URL /rest-api/server/license
Answer HTTP/1.1 200 OK
Content-Type: application/json

{
   "status":"success",
   "data":{
      "licenseState":"VALID",
      "licenseEndTime":123012311
      "maxTranscoding":-1,
      "maxBroadcasts":-1,
      "maxConnections":-1,
   }
}
                                        
Table 11. Server license table.

Field explanation:

licenseState License status: VALID, INVALID.
maxTranscoding Max transcoding tasks per server, -1 means unlimited.
maxBroadcasts Max active broadcasts tasks per server, -1 means unlimited.
maxConnections Max simultaneous viewer connections per server, -1 means unlimited.
expireDate Unix time for license expiration.
Table 12. Server license fields table.
Support Needed?

Create a free ticket and our support team will provide you necessary assistance.