Ports

Ports is the operational inventory for listening sockets inside Callaba Engine. Teams use it when a launch fails because a port is already occupied, when two modules should not collide, or when a stale listener has to be cleared before the next live window starts.

This page matters during setup and incident response. It helps operators answer three practical questions quickly: which port is busy right now, which module owns it, and whether it is safe to release that listener before a new ingest, player, or route goes live.

Examples by preset

The useful patterns here are operational rather than transport-specific: inventory the current listeners, count how much surface area the instance is exposing, and release a blocked port only when the team is sure the old process should stop.

{
  "sort": { "created": 1 },
  "limit": 20,
  "skip": 0
}
{
  "port": 1935,
  "transport": "UDP"
}

Workflow examples

Check whether the instance is ready for the next ingest or playback job

Use the listing endpoints before turning up a new listener or player. This gives the team a quick inventory of who already owns the expected ports.

Clear a blocked listener after a failed or abandoned runtime process

Use releasePort only when the old process should truly stop. In production, this is the fast path when a failed job left a port occupied and the next launch cannot proceed.

Map module ownership during troubleshooting

When several modules share the same host, the port inventory helps operations see which part of the stack is actually bound to a listener before they change anything.

Get all ports
Collapse
POST
/api/ports/getAll

Use this method when the team needs a current inventory of listening ports on the instance. It is most valuable before launching a new module or when troubleshooting a port collision that blocks the next runtime action.

The response is operationally useful because it ties the port and transport to the module and entity that currently owns it.

Request body parameters
limit
integer

Optional page size for the port inventory query.

skip
integer

Optional offset for paginated listing.

sort
object

Optional sort descriptor. The dashboard store defaults to { created: 1 }.

Get all ports
curl --request POST \
--url http://localhost/api/ports/getAll \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"sort": {
"created": 1
},
"limit": 20,
"skip": 0
}'
Response
array of port objects
array

The backend returns a list of currently visible listeners with the port, transport, owning entity, and owning module.

Response: Get all ports
JSON
[
{
"id": "681200000000000000000001",
"port": 1935,
"transport": "UDP",
"entity_name": "Main SRT ingest",
"module_name": "MODULE_SRT_SERVERS",
"success": true
}
]
Get ports count
Expand
POST
/api/ports/getCount

Use this method when the UI or an operator needs a lightweight count of how many listening ports are currently visible without loading the full inventory list.

Request body parameters
This method has no parameters
Get ports count
curl --request POST \
--url http://localhost/api/ports/getCount \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{}'
Response
count
integer

Total number of listening ports currently visible to the authenticated user.

success
boolean

Successful responses expose success: true.

Response: Get ports count
JSON
{
"count": 4,
"success": true
}
Release port
Expand
POST
/api/ports/releasePort

Use this method when a specific port is blocked by a stale or no-longer-needed process and the team has decided that listener should be stopped. This is a recovery action, not routine housekeeping.

Because the backend releases the port by stopping the process that owns it, this endpoint should be treated as an operator action with real runtime impact.

Request body parameters
port
integer

Port number that should be released.

transport
string

Transport protocol for the blocked listener. Real product values are TCP and UDP.

Release port
curl --request POST \
--url http://localhost/api/ports/releasePort \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"port": 1935,
"transport": "UDP"
}'
Response
success
boolean

The backend confirms that the release action completed. In practice this means the process using that port was stopped.

Response: Release port
JSON
{
"success": true
}