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

webntfWebsocket service called via API
channel.infoAction called on remote API

API request data

domainTarget domain name for notifications
channelKey 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)
    }
}