Notification API - channel.info
This API action returns information about a specific websocket channel.
The "clients" response data parameter contains the number of websockets currently connected to the channel.
API service and action
webntf | Websocket service called via API |
channel.info | Action called on remote API |
API request data
domain | Target domain name for notifications |
channel | Key of the required websocket channel |
Example request data
array(2) {
["domain"]=>
string(16) "www.websocket.cz"
["channel"]=>
string(16) "www.websocket.cz"
}
Example PHP code for call websocket API
$responseData = $rest2WebSocket->call("webntf", "channel.info", [
"domain" => "www.websocket.cz"
, "channel" => "www.websocket.cz"
]);
API response data
array(3) {
["status"]=>
string(2) "OK"
["time"]=>
float(1647438936.566092)
["result"]=>
array(7) {
["key"]=>
string(16) "www.websocket.cz"
["time"]=>
float(1647436601.209406)
["expire"]=>
float(1647440201.209406)
["domain"]=>
string(16) "www.websocket.cz"
["locked"]=>
int(1)
["stored"]=>
int(0)
["clients"]=>
int(7)
}
}