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 typeGET
URL/rest-api/server/info
AnswerHTTP/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:versionStorm’s current version
strom:branchCode branch, usually “main”, unless code for compiled for specific environment or client.
storm:protocol_revSpecifies required protocol version for web video player.
software:osNameOperating system name.
software:osVersionOperating system version.
software:osArchOperating system architecture.
hardware:cpuCountNumber of cores for the processor (including virtual cores).
hardware:totalMemoryTotal memory size for this machine in bytes.
Table 2. Server version and branch fields table.

Server Status

Request typeGET
URL/rest-api/server
AnswerHTTP/1.1 200 OK
Content-Type: application/json

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

Field explanation:

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

Shutting Server Down

Request typePUT
Request Data

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

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

Field explanation:

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

Restarting Server

Request typePUT
Request Data

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

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

Field explanation:

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

Server CPU/Memory Usage

Request typeGET
URL/rest-api/server/usage
AnswerHTTP/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:

CPULoadCurrent CPU load in precents. Value 1.0 means 100% of all CPUs.
totalAllocatedMemoryTotal amount of memory allocated by the server.
totalUsedMemoryAmount of memory being used by the server.
threadPoolNameName of a specific thread-pool.
activeThreadsNumber of threads performing tasks.
totalThreadsTotal number of threads in this thread-pool.
awaitingTasksNumber of tasks awaiting to be performed by threads in this pool.
tasksPerSecondNumber of tasks performed per second.
Table 10. Server CPU/memory usage fields table.

Server License

Request typeGET
URL/rest-api/server/license
AnswerHTTP/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:

licenseStateLicense status: VALID, INVALID.
maxTranscodingMax transcoding tasks per server, -1 means unlimited.
maxBroadcastsMax active broadcasts tasks per server, -1 means unlimited.
maxConnectionsMax simultaneous viewer connections per server, -1 means unlimited.
expireDateUnix 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.