Skip to main content
Skip table of contents

Types of websocket pushes

Types of websocket pushes

List of all pushes available in the administrator client API

Push for administrator permissions change. Channel: user.ID. Event: App\Events\UserPush

CODE
{
    "data":{
        "type": "permissions_updated",
        "status": "ok",
        "data": {
            "detached": [1,2],
            "attached": [4,6]
        }
    },
    "subject": null,
    "message": null
}

Push for changes in accessible root camera tree elements. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "admin_camera_groups_updated",
        "status": "ok",
        "data": {
            "detached": [1,2],
            "attached": [4,6]
        }
    },
    "subject": null,
    "message": null
}
    
Push for changes in accessible root intercom tree elements. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "admin_intercom_groups_updated",
        "status": "ok",
        "data": {
            "detached": [1,2],
            "attached": [4,6]
        }
    },
    "subject": null,
    "message": null
}

Push for changes in accessible DHCP groups. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "dhcp_subnet_groups_updated",
        "status": "ok",
        "data": {
            "detached": [1,2],
            "attached": [4,6]
        }
    },
    "subject": null,
    "message": null
}

Push generated during archive generation. If the status is error, the URL will be null. Channel: token.ID. Event: App\Events\TokenPush
{
    "data":{
        "type": "archive_generated",
        "status": "ok|error",
        "data": {
            "download": {
                "id": 186,
                "name": "City, Street 1, file.mp4",
                "type": "mp4",
                "url": "http://127.0.0.1:8080/storage/",
                "from": "2019-09-24 13:08:03",
                "to": "2019-09-24 13:08:47",
                "created_at": "2019-09-24T14:34:37.000000Z",
                "updated_at": "2023-02-10T15:09:25.000000Z",
                "is_file_exists": true,
                "user_id": 1
            }
        }
    },
    "subject": null,
    "subject": null
}

Push generated during configuration template camera exports. If the status is error, the data will be empty. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "export_config",
        "status": "ok",
        "data": {
            "url": "https://localhost/file.mp4"
        }
    },
    "subject": null,
    "subject": null
}

Result of an asynchronous task for camera template file upload. Event: App\Events\UserPush.
{
    "data":{
        "type": "import_config",
        "message": "This is a placeholder message",
        "status": "ok|error",
        "data": []
    },
    "subject": null,
    "subject": null
}

Push generated during report generation. If the status is error, the data will be empty. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "generate_report",
        "status": "ok",
        "data": {
            "report": {
                "name" : "City, Street 1, file.mp4",
                "type" : "mp4",
                "url" : "http://127.0.0.1:8080/storage/",
                "created_at" : "2019-09-24T13:54:44.000000Z"
            }
        }
    },
    "subject": null,
    "subject": null
}

Pushes for applying configuration to cameras. Channel: user.ID. Event: App\Events\UserPush
{
    "data":{
        "type": "camera_config_apply",
        "status": "ok|error",
        "data": {
            "camera": {
                "id": 429,
                "group_id": 556,
                "status": "active",
                "type": "media_server_v2",
                "start_at": "2022-12-31 18:42:54",
                "created_at": "2022-02-22 22:37:16",
                "billing_id": null,
                "pretty_name": "Address",
                "pretty_text": "Address",
                "short_address": "Address",
                "full_address": "Address",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "is_archive_recording": true,
                "archive_recording_type": "fulltime",
                "can_change_archive_timetable": true,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "Camera"
            },
            "config_template": 12,
            "reason": "Some text, but can be null"
        }
    },
    "subject": null,
    "subject": null
}

Push for intercom status changes. Channel: admin.intercom-index. Event: App\Events\UserPush
{
    "data":{
        "type": "intercom_status_changed",
        "status": "ok",
        "data": {
            "id": 18,
            "status": "active",
            "status_pretty": "Active"
        }
    },
    "subject": null,
    "subject": null
}

Pushes that may be received during DHCP subnet loading from a file. Channel: user.ID. Event: App\Events\UserPush
{
    "Push for successful loading" : {
        "data":{
            "type": "upload_dhcp_subnets",
            "status": "ok",
            "data": []
        },
        "subject": null,
        "subject": null
    },
    "Push for unsuccessful loading" : {
        "data":{
            "type": "upload_dhcp_subnets",
            "status": "error",
            "data": {
                "message": "This is a message placeholder"
            }
        },
        "subject": null,
        "subject": null
    },
    "Intermediate progress information during the loading process" : {
        "data":{
            "type": "upload_dhcp_subnets",
            "status": "message",
            "data": {
                "message": "This is a message placeholder"
            }
        },
        "subject": null,
        "subject": null
    }
}

Pushes for analytics server statistics. This channel can have two different push formats. Channel: admin.analytic-servers-index. Event: App\Events\AdminStatPush
    "type 1" : {
            "data": {
            "binaryUid": "1d8602f4-82bc-11ed-baa7-53140b40c341",
            "coresUsed": 47,
            "cpuUsageAvg": 28,
            "memUsageRssBytes": 3832954880,
            "memUsageTotalBytes": 14565945344,
            "netBytesInPerSec": 70639264,
            "netBytesOutPerSec": 3217367,
            "streams": {
                "1d71ec24-82bc-11ed-baa7-53140b40c341": {
                    "frameProcessRate": 16.129032,
                    "starttime": 1672376602,
                    "status": "WORKING",
                    "streamUid": "287eb097-69fd-4582-ae4a-3428f1928742",
                    "uptime": 1054636,
                    "camera_id": 109993,
                    "is_can_restart": false
                },
                "streamsCount": 1
            }
        },
        "subject": "binary_stats",
        "message": null
    },
    "type 2": {
        "data": {
            "cpu": {
                "cpu_count": 64,
                "cpu_loadavg_percent_15min": 2.828125,
                "cpu_loadavg_percent_1min": 2.9375,
                "cpu_loadavg_percent_5min": 2.78125
            },
            "ipaddress": "10.0.160.4",
            "memory": {
                "available_memory": 70942662656,
                "total_memory": 99785158656,
                "used_memory": 27567333376,
                "used_percent_memory": 28.9
                }
        },
        "subject": "server_stats",
        "message": null
    }
}

Pushes for camera status changes. Only applicable to Flussonic cameras (outdated functionality). Channel: admin.admin. Event: App\Events\AdminPush
{
    "data": {
        "type": "camera_status_updated",
        "status": "ok",
        "data": {
            "camera": {
                "id": 429,
                "group_id": 556,
                "status": "active",
                "type": "media_server_v2",
                "start_at": "2022-12-31 18:42:54",
                "created_at": "2022-02-22 22:37:16",
                "billing_id": null,
                "lat": null,
                "lng": null,
                "azimuth": null,
                "is_archive_recording": true,
                "archive_recording_type": "fulltime",
                "can_change_archive_timetable": true,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "Camera"
            }
        }
    },
    "subject": null,
    "message": null
}

Pushes for translation updates. Channel: admin.dictionary-update. Event: App\Events\AdminPush
{
    "data": {
        "type": "dictionary_update",
        "status": "ok",
        "data": {
            "diff": {
                "new_key_changes": "new_values_changes"
            }
        }
    },
    "subject": null,
    "message": null
}

Push for successful intercom key file export. Channel: token.ID. Event: App\Events\TokenPush
{
    "data": {
        "type": "export_intercom_keys",
        "status": "ok",
        "data": {
            "path": "https://vms.local/reports/intercoms/intercom_Test_keys_(1970-11-11)_M2qTz6ubQcHA1w6K.xlsx"
        }
    },
    "subject": null,
    "message": null,
    "socket": null
}

Push for successful export of consolidated intercom key|apartment|user file. Channel: token.ID. Event: App\Events\TokenPush
{
    "data": {
        "type": "export_intercom_keys",
        "status": "ok|error",
        "data": {
            "path": "http://127.0.0.1:8000/storage/reports/intercoms/exports/intercom_1_keys_(1970-1-1)_7OifPT0RuEfUgeel.xlsx"
        }
    },
    "subject": null,
    "message": null,
    "socket": null
}

Push for unsuccessful export of consolidated intercom key|apartment|user file. Channel: token.ID. Event: App\Events\TokenPush
{
    "data": {
        "type": "import_intercom_flats_users_keys_failed",
        "status": "ok|error",
        "data": {
            "path": "http://127.0.0.1:8000/storage/reports/intercoms/exports/failures/2023-5-17_Kj6k3TTmxG2uPVla.xlsx"
        }
    },
    "subject": null,
    "message": null,
    "socket": null
}

Push for successful export of consolidated intercom key|apartment|user file. Channel: token.ID. Event: App\Events\TokenPush
{
    "data": {
        "type": "import_intercom_flats_users_keys",
        "status": "ok|error",
        "data": []
    },
    "subject": null,
    "message": null,
    "socket": null
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '[]'
PHP
PHP
$data = array (
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => '/',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.