Notifications

Notifications can be received from the controller, they can be used to update your local data.

Notification endpoints

Listen to the HTTP stream endpoint or to the Websocket endpoint.

It is recommended to use the Websocket endpoint.

Available notifications

ping

Keep-alive between client and controller. Also used to receive the current CPU and memory usage.

{
    "compute_id": 12
}

compute.created

A compute has been created.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "http",
    "user": "julien"
}

compute.updated

A compute has been updated.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute_id",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "https",
    "user": "julien"
}

compute.deleted

A compute has been deleted.

{
    "capabilities": {
        "node_types": [],
        "version": null
    },
    "compute_id": "my_compute_id",
    "connected": false,
    "cpu_usage_percent": null,
    "host": "localhost",
    "memory_usage_percent": null,
    "name": "http://julien@localhost:84",
    "port": 84,
    "protocol": "http",
    "user": "julien"
}

node.created

A node has been created.

{
    "a": "b"
}

node.updated

A node has been updated.

{
    "command_line": "",
    "compute_id": "local",
    "console": 5006,
    "console_host": "127.0.0.1",
    "console_type": "telnet",
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-family: TypeWriter;font-size: 10;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
        "text": "PC2",
        "x": 18,
        "y": -25
    },
    "name": "PC2",
    "node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_load_project0/project-files/vpcs/748bcd89-624a-40eb-a8d3-1d2e85c99b51",
    "node_id": "748bcd89-624a-40eb-a8d3-1d2e85c99b51",
    "node_type": "vpcs",
    "port_name_format": "Ethernet{0}",
    "port_segment_size": 0,
    "ports": [
        {
            "adapter_number": 0,
            "data_link_types": {
                "Ethernet": "DLT_EN10MB"
            },
            "link_type": "ethernet",
            "name": "Ethernet0",
            "port_number": 0,
            "short_name": "e0"
        }
    ],
    "project_id": "3c1be6f9-b4ba-4737-b209-63c47c23359f",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": -71,
    "y": -98,
    "z": 1
}

node.deleted

A node has been deleted.

drawing.created

A drawing has been created.

{
    "drawing_id": "510703c2-6ba8-47d5-bcbf-20a3fe6790af",
    "project_id": "972df51a-85cc-4762-bb3f-f03bd52d7b2c",
    "rotation": 0,
    "svg": "<svg height=\"210\" width=\"500\"><line x1=\"0\" y1=\"0\" x2=\"200\" y2=\"200\" style=\"stroke:rgb(255,0,0);stroke-width:2\" /></svg>",
    "x": 10,
    "y": 20,
    "z": 0
}

drawing.updated

A drawing has been updated. The svg field is only included if it has changed in order to reduce data transfer.

{
    "drawing_id": "5f9c48be-d144-4666-a66f-5bc6d93e2f32",
    "project_id": "600de23c-5af1-44a1-8c67-3023ceb6e6c7",
    "rotation": 0,
    "x": 42,
    "y": 20,
    "z": 0
}

drawing.deleted

A drawing has been deleted.

{
    "drawing_id": "7447cc2c-18fb-4db7-87a7-11b81ebd036d",
    "project_id": "74c2978e-03fe-4873-ac04-433fb93cb2b0",
    "rotation": 0,
    "svg": "<svg></svg>",
    "x": 0,
    "y": 0,
    "z": 0
}

project.updated

A project has been updated.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "grid_size": 0,
    "name": "test2",
    "path": "/tmp/tmpos2k9l46/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "opened",
    "supplier": null,
    "variables": [
        {
            "name": "TEST1"
        },
        {
            "name": "TEST2",
            "value": "value1"
        }
    ],
    "zoom": 100
}

project.closed

A project has been closed.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "grid_size": 0,
    "name": "test",
    "path": "/tmp/tmpirgd0q7l/projects/2010428c-85a1-4416-b018-69ae822e297b",
    "project_id": "2010428c-85a1-4416-b018-69ae822e297b",
    "scene_height": 1000,
    "scene_width": 2000,
    "show_grid": false,
    "show_interface_labels": false,
    "show_layers": false,
    "snap_to_grid": false,
    "status": "closed",
    "supplier": null,
    "variables": null,
    "zoom": 100
}

snapshot.restored

A snapshot has been restored

log.error

Sends an error

{
    "message": "Permission denied on /tmp"
}

log.warning

Sends a warning

{
    "message": "Warning ASA 8 is not officialy supported by GNS3"
}

log.info

Sends an information

{
    "message": "Image uploaded"
}

settings.updated

GUI settings have been updated. Will be removed in a later release.

{
    "modification_uuid": "c8a68ba6-b99c-491d-b12b-9ff4089f04ac",
    "test": true
}