Project notifications¶
Project notifications can be received from the controller, they can be used to update projects.
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
}
node.updated¶
A node has been updated.
node.deleted¶
A node has been deleted.
link.created¶
A link has been created. Note that a link is not connected to any node when it is created.
{
"capture_compute_id": null,
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "cff847b1-0233-4ee1-bb26-82039debff2b",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
"text": "0/3"
},
"node_id": "fd4dc1ea-7688-4e42-bba1-71bfa31eddbc",
"port_number": 3
},
{
"adapter_number": 2,
"label": {
"style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
"text": "2/4"
},
"node_id": "74e807d2-2e9a-467c-a44f-08b725c24cc9",
"port_number": 4
}
],
"project_id": "51c1ac28-1756-4912-a31a-36d480326e9b",
"suspend": false
}
link.updated¶
A link has been updated.
{
"capture_compute_id": null,
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "b76bd8b1-2171-4361-9228-801713d23079",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "8b77b480-361e-488b-96b1-a769890e11ec",
"port_number": 3
},
{
"adapter_number": 2,
"label": {
"style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
"text": "2/4"
},
"node_id": "b4688a3d-0af8-4ddc-b85f-e26dc1031c4c",
"port_number": 4
}
],
"project_id": "85333131-b83a-4112-9a51-184ba0c536a8",
"suspend": false
}
link.deleted¶
A link has been deleted.
{
"capture_compute_id": null,
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {},
"link_id": "695dacc3-7daf-493e-b31f-3370436f1d23",
"link_type": "ethernet",
"nodes": [],
"project_id": "4589f3fc-4d98-4170-ac66-ed1262cac368",
"suspend": false
}
drawing.created¶
A drawing has been created.
{
"drawing_id": "2ebb202d-7cd6-4e0e-8448-736f6aa9c873",
"locked": false,
"project_id": "de7a5304-5089-4d87-b131-ab463aa9d708",
"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": "fa60bbc1-49d7-4122-92a3-0dff9063058e",
"locked": false,
"project_id": "6d93155f-b360-4b6e-a036-277cf4f076e5",
"rotation": 0,
"x": 42,
"y": 20,
"z": 0
}
drawing.deleted¶
A drawing has been deleted.
{
"drawing_id": "e2420e1d-9029-4281-ad88-e0fd24620abe",
"locked": false,
"project_id": "fd4df447-9859-490a-aeeb-a37f30c46754",
"rotation": 0,
"svg": "<svg></svg>",
"x": 0,
"y": 0,
"z": 2
}
project.updated¶
A project has been updated.
{
"auto_close": true,
"auto_open": false,
"auto_start": false,
"drawing_grid_size": 25,
"filename": "test.gns3",
"grid_size": 75,
"name": "test2",
"path": "/tmp/tmp4p7e6dvr/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,
"drawing_grid_size": 25,
"filename": "Test.gns3",
"grid_size": 75,
"name": "Test",
"path": "/tmp/tmpkrfbz5gp/projects/79431797-f481-40d8-ba28-f944423a8aaf",
"project_id": "79431797-f481-40d8-ba28-f944423a8aaf",
"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