Notifications¶
You can receive notification from the controller allowing you to update your local data.
Notifications endpoints¶
You can listen the HTTP stream /notifications or the websocket.
We recommend using the websocket.
Available notifications¶
compute.created¶
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¶
Compute has been updated. You will receive a lot of this event because it’s include change of CPU and memory usage on the compute node.
{
"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¶
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.updated¶
Node has been updated.
{
"command_line": "",
"compute_id": "local",
"console": 5004,
"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": "PC1",
"x": 18,
"y": -25
},
"name": "PC1",
"node_directory": "/private/var/folders/qy/g6blgc5n7y93pzg61zyt7cmr0000gn/T/pytest-of-behlers/pytest-0/test_load_project0/project-files/vpcs/64ba8408-afbf-4b66-9cdd-1fd854427478",
"node_id": "64ba8408-afbf-4b66-9cdd-1fd854427478",
"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": -300,
"y": -118,
"z": 1
}
node.deleted¶
Node has been deleted.
link.created¶
Link has been created. Note that a link when created is not yet connected to both part.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "d61729b0-e4c8-4d29-9e37-ed7997d2fcd8",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"rotation": 0,
"style": "font-size: 10; font-style: Verdana",
"text": "0/3",
"x": -10,
"y": -10
},
"node_id": "2384cb6c-1783-4872-9c9e-91f015dee027",
"port_number": 3
},
{
"adapter_number": 2,
"label": {
"rotation": 0,
"style": "font-size: 10; font-style: Verdana",
"text": "2/4",
"x": -10,
"y": -10
},
"node_id": "a679eb04-b702-4353-baa2-3554e49396b1",
"port_number": 4
}
],
"project_id": "9ca80ee5-8396-4c65-a477-874532d42ed3",
"suspend": false
}
link.updated¶
Link has been updated.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "e29aad22-7d24-4648-8282-0c41d1c7e70e",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "eb22314e-ff91-4679-8b65-636ec8b34905",
"port_number": 3
},
{
"adapter_number": 2,
"label": {
"rotation": 0,
"style": "font-size: 10; font-style: Verdana",
"text": "2/4",
"x": -10,
"y": -10
},
"node_id": "1268c0a0-8652-4dba-beaf-07cef8e0a310",
"port_number": 4
}
],
"project_id": "c4cba489-d792-4244-9242-07f53f6c4eac",
"suspend": false
}
link.deleted¶
Link has been deleted.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {},
"link_id": "3b6257c1-ce3b-44c8-8c6c-a0457d6e9e04",
"link_type": "ethernet",
"nodes": [],
"project_id": "2883d355-8b23-4ddd-a21b-ff213e485c29",
"suspend": false
}
drawing.created¶
Drawing has been created.
{
"drawing_id": "b6e1dcb4-442c-4c55-a1eb-537f57ee7974",
"project_id": "6170501f-a3d6-4ab7-82e7-57b4394538f8",
"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¶
Drawing has been updated. To reduce data transfert if the svg field has not change the field is not included.
{
"drawing_id": "eb4a10ff-3cd1-47dd-b95b-1792d2b08f5c",
"project_id": "730a3525-db50-4a6a-ac7b-c724c3eed9e8",
"rotation": 0,
"x": 42,
"y": 20,
"z": 0
}
drawing.deleted¶
Drawing has been deleted.
{
"drawing_id": "df4f6a0a-429a-40c9-ae38-dbb4733d0750",
"project_id": "3cf20b3c-0602-49a6-b593-d49b6a1a5238",
"rotation": 0,
"svg": "<svg></svg>",
"x": 0,
"y": 0,
"z": 0
}
project.updated¶
Project has been updated.
{
"auto_close": true,
"auto_open": false,
"auto_start": false,
"filename": "test.gns3",
"name": "test2",
"path": "/var/folders/qy/g6blgc5n7y93pzg61zyt7cmr0000gn/T/tmp3n7ijfjb/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",
"zoom": 100
}
project.closed¶
Project has been closed.
{
"auto_close": true,
"auto_open": false,
"auto_start": false,
"filename": "test.gns3",
"name": "test",
"path": "/var/folders/qy/g6blgc5n7y93pzg61zyt7cmr0000gn/T/tmpsh708y29/projects/2f24e0e9-9f39-41d3-a413-e7c14c5db6f7",
"project_id": "2f24e0e9-9f39-41d3-a413-e7c14c5db6f7",
"scene_height": 1000,
"scene_width": 2000,
"show_grid": false,
"show_interface_labels": false,
"show_layers": false,
"snap_to_grid": false,
"status": "closed",
"zoom": 100
}
snapshot.restored¶
Snapshot has been restored
log.warning¶
Send a warning to the user
{
"message": "Warning ASA 8 is not officialy supported by GNS3"
}
settings.updated¶
GUI settings updated. Will be removed in a later release.
{
"modification_uuid": "c1aaa5d1-ce63-49f4-bfcc-e67dfac60ce3",
"test": true
}