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.

{
    "a": "b"
}

node.deleted

A node has been deleted.

{
    "a": "b"
}

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
}

snapshot.restored

A snapshot has been restored

{
    "created_at": 1578450520,
    "name": "test",
    "project_id": "9aded720-678c-4fb8-849a-6f4275931e5b",
    "snapshot_id": "e1aa52cf-0003-4208-81a4-f45307793100"
}

log.error

Sends an error

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

log.warning

Sends a warning

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

log.info

Sends an information

{
    "message": "Image uploaded"
}