System utilities

This section will cover additional methods for working with Callaba streaming API nodes.

Obtaining server resource consumption statistics
Expand
POST
/api/utils/getStat

Returns a JSON object with parameters.

  • cpuUsage - CPU consumption in %
  • RAM - the amount of occupied RAM in %
  • drive - the size of the remaining free disk space
Query parameters
This method has no parameters
Obtaining server resource consumption statistics
cURL
curl -X 'POST' \
'http://1.2.3.4/api/utils/getStat' \
-H 'accept: application/json' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMGJlYjA2MTM3YmIzMDAyYzhmNjAwYSIsImlhdCI6MTY0NzM2NDM3NSwiZXhwIjoxNjQ5OTU2Mzc1fQ.gScR-FPsfmsFvFW59eCH4-jThF2qcZ-2QYKwlN_wswE' \
-H 'Content-Type: application/json' \
-d ''
Response
Response: Obtaining server resource consumption statistics
JSON
{
"cpuUsage": 11.76,
"drive": {
"totalGb": "88.0",
"usedGb": "44.6",
"freeGb": "43.4",
"usedPercentage": "50.7",
"freePercentage": "49.3"
},
"RAM": {
"totalMemMb": 15904.04,
"usedMemMb": 9855.47,
"freeMemMb": 6048.57,
"usedMemPercentage": 61.97,
"freeMemPercentage": 38.03
}
}
Server network speed test
Expand
POST
/api/utils/speedtest

Returns data on outgoing and incoming network bandwidth.

Query parameters
This method has no parameters
Server network speed test
cURL
curl -X 'POST' \
'http://1.2.3.4/api/utils/speedtest' \
-H 'accept: application/json' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMGJlYjA2MTM3YmIzMDAyYzhmNjAwYSIsImlhdCI6MTY0NzM2NDM3NSwiZXhwIjoxNjQ5OTU2Mzc1fQ.gScR-FPsfmsFvFW59eCH4-jThF2qcZ-2QYKwlN_wswE' \
-H 'Content-Type: application/json' \
-d ''
Response
Response: Server network speed test
JSON
{
"timestamp":"2022-03-15T17:51:30.000Z",
"ping": {"jitter":12.785,"latency":99.965},
"download": {"bandwidth":274653,"bytes":2490572,"elapsed":9407},
"upload":{"bandwidth":244916,"bytes":1465282,"elapsed":6007},"packetLoss":0,"isp":"London ISP","interface":
}
Get a list of the used ports
Expand
POST
/api/utils/getListeningPorts

Get a list of ports used by the Callaba Engine.

Returns an array of objects containing the properties:

  • port - possible values from 1 to 65535
  • transport - possible values : TCP or UDP
Query parameters
This method has no parameters
Get a list of the used ports
cURL
curl -X 'POST' \
'http://1.2.3.4/api/utils/getUsedPorts' \
-H 'accept: application/json' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMGJlYjA2MTM3YmIzMDAyYzhmNjAwYSIsImlhdCI6MTY0NzM2NDM3NSwiZXhwIjoxNjQ5OTU2Mzc1fQ.gScR-FPsfmsFvFW59eCH4-jThF2qcZ-2QYKwlN_wswE' \
-H 'Content-Type: application/json' \
-d ''
Response
Response: Get a list of the used ports
JSON
[
{
"port": 1935,
"transport": "UDP"
},
{
"port": 1945,
"transport": "TCP"
}
]