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.created

A node has been created.

{
    "a": "b"
}

node.updated

A node has been updated.

node.deleted

A node has been deleted.

drawing.created

A drawing has been created.

{
    "drawing_id": "06327a2c-dd10-463e-9f6c-c316163cd22a",
    "locked": false,
    "project_id": "83bd229b-2d4f-4de0-9737-6adc97f1584a",
    "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": "7bdcefac-b0d0-4222-b911-e8d37888fb13",
    "locked": false,
    "project_id": "6bc7d6c6-926f-47ec-8d1f-cbe57b2658fe",
    "rotation": 0,
    "x": 42,
    "y": 20,
    "z": 0
}

drawing.deleted

A drawing has been deleted.

{
    "drawing_id": "5249e73d-f3fd-4a78-9290-081c406136fe",
    "locked": false,
    "project_id": "7c63d45f-d59a-482a-a5bb-6f77300ec7cd",
    "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/tmppe1x8on6/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/tmpsz64slgw/projects/7067008d-8304-4384-a280-4ce79aa81b05",
    "project_id": "7067008d-8304-4384-a280-4ce79aa81b05",
    "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"
}