Welcome to API documentation!

Warning

This documentation are for developers for user documentation go to https://gns3.com/

The API is not stable, feel free to post comments on our website https://gns3.com/

This documentation cover the GNS3 API and ressources for GNS3 developers.

If you want a quick demo on how to use the API read: Sample session using curl

API

General

Architecture

GNS3 is splitted in four part:

  • the GUI (project gns3-gui, gns3-web)
  • the controller (project gns3-server)
  • the compute (project gns3-server)
  • the emulators (qemu, iou, dynamips...)

The controller pilot everything it’s the part that manage the state of a project, save it on disk. Only one controller exists.

The GUI display the topology. The GUI has only direct contact with the controller.

The compute are where emulator are executed. If the compute is on the same server as the controller, they are in the same process.

For each node of the topology will start an emulator instance.

A small schema:

+---------------+                  +----------+     +------+
|               |                  | COMPUTE  +-----> QEMU |
|  GNS3 GUI     |              +---> SERVER 1 |     +------+
|  QT interface +-----+        |   +----------+
|               |     |        |                    +---+
+---------------+    +v--------++               +--->IOU|
                     |CONTROLLER|               |   +---+
      +---------+    +^--------++  +---------+  |
      | GNS3 WEB+-----+        |   | COMPUTE +--+
      +---------+              +---> SERVER 2+--+   +--------+
                                   +---------+  +--->DYNAMIPS|
                                                    +--------+

If you want to pilot GNS3 you need to use the controller API.

Communications

All the communication are done over HTTP using JSON.

Errors

In case of error a standard HTTP error is raise and you got a JSON like that

{
    "status": 409,
    "message": "Conflict"
}

409 error could be display to the user. They are normal behavior they are used to warn user about something he should change and they are not an internal software error.

Limitations

Concurrency

A node can’t process multiple request in the same time. But you can make multiple request on multiple node. It’s transparent for the client when the first request on a Node start a lock is acquire for this node id and released for the next request at the end. You can safely send all the requests in the same time and let the server manage an efficent concurrency.

We think it can be a little slower for some operations, but it’s remove a big complexity for the client due to the fact only some command on some node can be concurrent.

Authentication

You can use HTTP basic auth to protect the access to the API. And run the API over HTTPS.

Notifications

You can receive notification from the server if you listen the HTTP stream /notifications or the websocket.

Read Notifications for more informations

Previous versions

API version 1

Shipped with GNS3 1.3, 1.4 and 1.5. This API doesn’t support the controller system and save used a commit system instead of live save.

Glossary

Node

A Virtual Machine (Dynamips, IOU, Qemu, VPCS...), a cloud, a builtin device (switch, hub...)

Drawing

Drawing are visual element not used by the network emulation. Like text, images, rectangle... They are pure SVG elements.

Adapter

The physical network interface. The adapter can contain multiple ports.

Port

A port is an opening on network adapter that cable plug into.

For example a VM can have a serial and an ethernet adapter plugged in. The ethernet adapter can have 4 ports.

Controller

The central server managing everything in GNS3. A GNS3 controller will manage multiple GNS3 compute node.

Compute

The process running on each server with GNS3. The GNS3 compute node is controlled by the GNS3 controller.

Symbol

Symbol are the icon used for nodes.

Scene

The drawing area

Sample session using curl

You need to read the Glossary, and General before.

Full endpoints list is available: Endpoints

Warning

Beware the output of this sample is truncated in order to simplify the understanding. Please read the documentation for the exact output.

You can check the server version with a simple curl command:

# curl "http://localhost:3080/v2/version"
{
    "version": "2.0.0dev1"
}

List computes

We will list the computes node where we can run our nodes:

# curl "http://localhost:3080/v2/computes"
[
    {
        "compute_id": "local",
        "connected": true,
        "host": "127.0.0.1",
        "name": "Local",
        "port": 3080,
        "protocol": "http",
        "user": "admin"
    }
]

In this sample we have only one compute where we can run our nodes. This compute as a special id: local. This mean it’s the local server embed in the GNS3 controller.

Create project

The next step is to create a project.

# curl -X POST "http://localhost:3080/v2/projects" -d '{"name": "test"}'
{
    "name": "test",
    "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f",
}

Create nodes

With this project id we can now create two VPCS Node.

# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes" -d '{"name": "VPCS 1", "node_type": "vpcs", "compute_id": "local"}'
{
    "compute_id": "local",
    "console": 5000,
    "console_host": "127.0.0.1",
    "console_type": "telnet",
    "name": "VPCS 1",
    "node_id": "f124dec0-830a-451e-a314-be50bbd58a00",
    "node_type": "vpcs",
    "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f",
    "properties": {
        "startup_script": null,
        "startup_script_path": null
    },
    "status": "stopped"
}

# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes" -d '{"name": "VPCS 2", "node_type": "vpcs", "compute_id": "local"}'
{
    "compute_id": "local",
    "console": 5001,
    "console_host": "127.0.0.1",
    "console_type": "telnet",
    "name": "VPCS 2",
    "node_id": "83892a4d-aea0-4350-8b3e-d0af3713da74",
    "node_type": "vpcs",
    "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f",
    "properties": {
        "startup_script": null,
        "startup_script_path": null
    },
    "status": "stopped"
}

The properties dictionnary contains all setting specific to a node type (dynamips, docker, vpcs...)

Start nodes

Now we can start the two nodes.

# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes/f124dec0-830a-451e-a314-be50bbd58a00/start" -d "{}"
# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes/83892a4d-aea0-4350-8b3e-d0af3713da74/start" -d "{}"

Connect to nodes

Everything should be started now. You can connect via telnet to the different Node. The port is the field console in the create Node request.

# telnet 127.0.0.1 5000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Welcome to Virtual PC Simulator, version 0.6
Dedicated to Daling.
Build time: Dec 29 2014 12:51:46
Copyright (c) 2007-2014, Paul Meng (mirnshi@gmail.com)
All rights reserved.

VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.

Press '?' to get help.

VPCS> ip 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.1 255.255.255.0

VPCS> disconnect

Good-bye
Connection closed by foreign host.

# telnet 127.0.0.1 5001
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Welcome to Virtual PC Simulator, version 0.6
Dedicated to Daling.
Build time: Dec 29 2014 12:51:46
Copyright (c) 2007-2014, Paul Meng (mirnshi@gmail.com)
All rights reserved.

VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.

Press '?' to get help.

VPCS> ip 192.168.1.2
Checking for duplicate address...
PC1 : 192.168.1.2 255.255.255.0

VPCS> ping 192.168.1.1
84 bytes from 192.168.1.1 icmp_seq=1 ttl=64 time=0.179 ms
84 bytes from 192.168.1.1 icmp_seq=2 ttl=64 time=0.218 ms
84 bytes from 192.168.1.1 icmp_seq=3 ttl=64 time=0.190 ms
84 bytes from 192.168.1.1 icmp_seq=4 ttl=64 time=0.198 ms
84 bytes from 192.168.1.1 icmp_seq=5 ttl=64 time=0.185 ms

VPCS> disconnect
Good-bye
Connection closed by foreign host.

Stop nodes

And we stop the two nodes.

# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes/f124dec0-830a-451e-a314-be50bbd58a00/stop" -d "{}"
# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes/83892a4d-aea0-4350-8b3e-d0af3713da74/stop" -d "{}"

Add a visual element

When you want add visual elements to the topology like rectangle, circle, images you can just send a raw SVG. This will display a red square in the middle of your topologies:

# curl -X POST "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/drawings" -d '{"x":0, "y": 12, "svg": "<svg width=\"50\" height=\"50\"><rect width=\"50\" height=\"50\" style=\"fill: #ff0000\"></rect></svg>"}'

Tips: you can embed png/jpg... by using a base64 encoding in the SVG.

Create a Qemu node

# curl -X POST http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes -d '{"node_type": "qemu", "compute_id": "local", "name": "Microcore1", "properties": {"hda_disk_image": "linux-microcore-6.4.img", "ram": 256, "qemu_path": "qemu-system-x86_64"}}'

{
    "command_line": "",
    "compute_id": "local",
    "console": 5001,
    "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": "Microcore1",
        "x": null,
        "y": -40
    },
    "name": "Microcore1",
    "node_directory": "/Users/noplay/GNS3/projects/untitled/project-files/qemu/9e4eb45b-22f5-450d-8277-2934fbd0aa20",
    "node_id": "9e4eb45b-22f5-450d-8277-2934fbd0aa20",
    "node_type": "qemu",
    "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/0"
        }
    ],
    "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f",
    "properties": {
        "acpi_shutdown": false,
        "adapter_type": "e1000",
        "adapters": 1,
        "boot_priority": "c",
        "cdrom_image": "",
        "cdrom_image_md5sum": null,
        "cpu_throttling": 0,
        "cpus": 1,
        "hda_disk_image": "linux-microcore-6.4.img",
        "hda_disk_image_md5sum": "877419f975c4891c019947ceead5c696",
        "hda_disk_interface": "ide",
        "hdb_disk_image": "",
        "hdb_disk_image_md5sum": null,
        "hdb_disk_interface": "ide",
        "hdc_disk_image": "",
        "hdc_disk_image_md5sum": null,
        "hdc_disk_interface": "ide",
        "hdd_disk_image": "",
        "hdd_disk_image_md5sum": null,
        "hdd_disk_interface": "ide",
        "initrd": "",
        "initrd_md5sum": null,
        "kernel_command_line": "",
        "kernel_image": "",
        "kernel_image_md5sum": null,
        "legacy_networking": false,
        "mac_address": "00:af:69:aa:20:00",
        "options": "",
        "platform": "x86_64",
        "process_priority": "low",
        "qemu_path": "/usr/local/bin/qemu-system-x86_64",
        "ram": 256,
        "usage": ""
    },
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}

Create a dynamips node

# curl http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/nodes -d '{"symbol": ":/symbols/router.svg", "name": "R1", "properties": {"platform": "c7200", "nvram": 512, "image": "c7200-adventerprisek9-mz.124-24.T8.image", "ram": 512, "slot3": "PA-GE", "system_id": "FTX0945W0MY", "slot0": "C7200-IO-FE", "slot2": "PA-GE", "slot1": "PA-GE",  "idlepc": "0x606e0538", "startup_config_content": "hostname %h\n"}, "compute_id": "local", "node_type": "dynamips"}'

{
    "command_line": null,
    "compute_id": "local",
    "console": 5002,
    "console_host": "127.0.0.1",
    "console_type": "telnet",
    "first_port_name": null,
    "height": 45,
    "label": {
        "rotation": 0,
        "style": "font-family: TypeWriter;font-size: 10;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
        "text": "R1",
        "x": null,
        "y": -32
    },
    "name": "R1",
    "node_directory": "/Users/noplay/GNS3/projects/untitled/project-files/dynamips",
    "node_id": "f7367e7e-804e-48be-9037-284d4d9b059e",
    "node_type": "dynamips",
    "port_name_format": "Ethernet{0}",
    "port_segment_size": 0,
    "ports": [
        {
            "adapter_number": 0,
            "data_link_types": {
                "Ethernet": "DLT_EN10MB"
            },
            "link_type": "ethernet",
            "name": "FastEthernet0/0",
            "port_number": 0,
            "short_name": "f0/0"
        },
        {
            "adapter_number": 1,
            "data_link_types": {
                "Ethernet": "DLT_EN10MB"
            },
            "link_type": "ethernet",
            "name": "GigabitEthernet0/0",
            "port_number": 0,
            "short_name": "g0/0"
        },
        {
            "adapter_number": 2,
            "data_link_types": {
                "Ethernet": "DLT_EN10MB"
            },
            "link_type": "ethernet",
            "name": "GigabitEthernet1/0",
            "port_number": 0,
            "short_name": "g1/0"
        },
        {
            "adapter_number": 3,
            "data_link_types": {
                "Ethernet": "DLT_EN10MB"
            },
            "link_type": "ethernet",
            "name": "GigabitEthernet2/0",
            "port_number": 0,
            "short_name": "g2/0"
        }
    ],
    "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f",
    "properties": {
        "auto_delete_disks": false,
        "aux": null,
        "clock_divisor": 4,
        "disk0": 64,
        "disk1": 0,
        "dynamips_id": 2,
        "exec_area": 64,
        "idlemax": 500,
        "idlepc": "0x606e0538",
        "idlesleep": 30,
        "image": "c7200-adventerprisek9-mz.124-24.T8.image",
        "image_md5sum": "b89d30823cbbda460364991ed18449c7",
        "mac_addr": "ca02.dcbb.0000",
        "midplane": "vxr",
        "mmap": true,
        "npe": "npe-400",
        "nvram": 512,
        "platform": "c7200",
        "power_supplies": [
            1,
            1
        ],
        "private_config": "",
        "private_config_content": "",
        "ram": 512,
        "sensors": [
            22,
            22,
            22,
            22
        ],
        "slot0": "C7200-IO-FE",
        "slot1": "PA-GE",
        "slot2": "PA-GE",
        "slot3": "PA-GE",
        "slot4": null,
        "slot5": null,
        "slot6": null,
        "sparsemem": true,
        "startup_config": "configs/i2_startup-config.cfg",
        "startup_config_content": "!\nhostname R1\n",
        "system_id": "FTX0945W0MY"
    },
    "status": "stopped",
    "symbol": ":/symbols/router.svg",
    "width": 66,
    "x": 0,
    "y": 0,
    "z": 0
}

Notifications

You can see notification about the changes via the notification feed:

# curl "http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/notifications"
{"action": "ping", "event": {"compute_id": "local", "cpu_usage_percent": 35.7, "memory_usage_percent": 80.7}}
{"action": "node.updated", "event": {"command_line": "/usr/local/bin/vpcs -p 5001 -m 1 -i 1 -F -R -s 10001 -c 10000 -t 127.0.0.1", "compute_id": "local", "console": 5001, "console_host": "127.0.0.1", "console_type": "telnet", "name": "VPCS 2", "node_id": "83892a4d-aea0-4350-8b3e-d0af3713da74", "node_type": "vpcs", "project_id": "b8c070f7-f34c-4b7b-ba6f-be3d26ed073f", "properties": {"startup_script": null, "startup_script_path": null}, "status": "started"}}

A websocket version is also available on http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/notifications/ws

Read Notifications for more informations

How to found the endpoints?

Full endpoints list is available: Endpoints

If you start the server with –debug you can see all the requests made by the client and by the controller to the computes nodes.

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

ping

Keep the connection between client and controller.

{
    "compute_id": 12
}
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.created

Node has been created.

{
    "a": "b"
}
node.updated

Node has been updated.

{
    "command_line": "",
    "compute_id": "local",
    "console": 5006,
    "console_host": "localhost",
    "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": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_open0/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": {
        "startup_script": "",
        "startup_script_path": "startup.vpc"
    },
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": -71,
    "y": -98,
    "z": 1
}
node.deleted

Node has been deleted.

drawing.created

Drawing has been created.

{
    "drawing_id": "377bccc0-779a-44b0-ab5e-98dfd6dc46cd",
    "project_id": "adb641a0-8ec9-4b5a-b8df-cc993638c601",
    "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": "d86ab88f-28bf-4f22-aa4e-e6d3c423b98c",
    "project_id": "8f53f0f7-9967-4a01-884f-36ea1800e5ef",
    "rotation": 0,
    "x": 42,
    "y": 20,
    "z": 0
}
drawing.deleted

Drawing has been deleted.

{
    "drawing_id": "b2f8b12f-a4cc-4621-affc-cf3dcd4ba513",
    "project_id": "24ef7002-5dd6-4054-bf8a-d2aface0885e",
    "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/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpe4g8gdv7/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
project.closed

Project has been closed.

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0vixjsro/projects/74bd9388-bd2e-41cc-b8da-d014cfb9f908",
    "project_id": "74bd9388-bd2e-41cc-b8da-d014cfb9f908",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "closed"
}
snapshot.restored

Snapshot has been restored

log.error

Send an error to the user

{
    "message": "Permission denied on /tmp"
}
log.warning

Send a warning to the user

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

Send an information to the user

{
    "message": "Image uploaded"
}
settings.updated

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

{
    "test": true
}

Positions

In a the project object you have properties scene_height and scene_width this define the size of the drawing area as px.

The position of the node are relative to this with 0,0 as center of the area.

Endpoints

GNS3 expose two type of endpoints:

  • Controller
  • Compute

Controller API Endpoints

The controller manage all the running topologies. The controller has knowledge of everything on in GNS3. If you want to create and manage a topology it’s here. The controller will call the compute API when needed.

In a standard GNS3 installation you have one controller and one or many computes.

Compute
/v2/computes
POST /v2/computes

Register a compute server

Response status codes
  • 201: Compute server added
Input
Name Mandatory Type Description
compute_id string Server identifier
host string Server host
name string Server name
password ['string', 'null'] Password for authentication
port integer Server port
protocol enum Possible values: http, https
user ['string', 'null'] User for authentication
Output
Name Mandatory Type Description
capabilities object Get what a server support
compute_id string Server identifier
connected boolean Whether the controller is connected to the compute server or not
cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only
host string Server host
memory_usage_percent ['number', 'null'] RAM usage of the compute. Read only
name string Server name
port integer Server port
protocol enum Possible values: http, https
user ['string', 'null'] User for authentication
GET /v2/computes

List of compute servers

Response status codes
  • 200: Compute servers list returned
/v2/computes/{compute_id}
PUT /v2/computes/{compute_id}

Get a compute server information

Response status codes
  • 200: Compute server updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
compute_id string Server identifier
host string Server host
name string Server name
password ['string', 'null'] Password for authentication
port integer Server port
protocol enum Possible values: http, https
user ['string', 'null'] User for authentication
Output
Name Mandatory Type Description
capabilities object Get what a server support
compute_id string Server identifier
connected boolean Whether the controller is connected to the compute server or not
cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only
host string Server host
memory_usage_percent ['number', 'null'] RAM usage of the compute. Read only
name string Server name
port integer Server port
protocol enum Possible values: http, https
user ['string', 'null'] User for authentication
GET /v2/computes/{compute_id}

Get a compute server information

Response status codes
  • 200: Compute server information returned
Output
Name Mandatory Type Description
capabilities object Get what a server support
compute_id string Server identifier
connected boolean Whether the controller is connected to the compute server or not
cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only
host string Server host
memory_usage_percent ['number', 'null'] RAM usage of the compute. Read only
name string Server name
port integer Server port
protocol enum Possible values: http, https
user ['string', 'null'] User for authentication
DELETE /v2/computes/{compute_id}

Delete a compute instance

Parameters
  • compute_id: Compute UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/computes/{compute_id}/{emulator}/{action:.+}
GET /v2/computes/{compute_id}/{emulator}/{action:.+}

Forward call specific to compute node. Read the full compute API for available actions

Parameters
  • compute_id: Compute UUID
Response status codes
  • 200: OK
  • 404: Instance doesn’t exist
POST /v2/computes/{compute_id}/{emulator}/{action:.+}

Forward call specific to compute node. Read the full compute API for available actions

Parameters
  • compute_id: Compute UUID
Response status codes
  • 200: OK
  • 404: Instance doesn’t exist
Drawing
/v2/projects/{project_id}/drawings
GET /v2/projects/{project_id}/drawings

List drawings of a project

Parameters
  • project_id: Project UUID
Response status codes
  • 200: List of drawings returned
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/adb641a0-8ec9-4b5a-b8df-cc993638c601/drawings'

GET /v2/projects/adb641a0-8ec9-4b5a-b8df-cc993638c601/drawings HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 363
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:56 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/drawings

[
    {
        "drawing_id": "377bccc0-779a-44b0-ab5e-98dfd6dc46cd",
        "project_id": "adb641a0-8ec9-4b5a-b8df-cc993638c601",
        "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
    }
]
POST /v2/projects/{project_id}/drawings

Create a new drawing instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Drawing created
  • 400: Invalid request
Input
Name Mandatory Type Description
drawing_id string Drawing UUID
project_id string Project UUID
rotation integer Rotation of the element
svg string SVG content of the drawing
x integer X property
y integer Y property
z integer Z property
Output
Name Mandatory Type Description
drawing_id string Drawing UUID
project_id string Project UUID
rotation integer Rotation of the element
svg string SVG content of the drawing
x integer X property
y integer Y property
z integer Z property
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/cfd8b048-cac1-4bf4-a47d-cdcc731e4a89/drawings' -d '{"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}'

POST /v2/projects/cfd8b048-cac1-4bf4-a47d-cdcc731e4a89/drawings HTTP/1.1
{
    "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
}


HTTP/1.1 201
Connection: close
Content-Length: 323
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:56 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/drawings

{
    "drawing_id": "a00d5332-87f1-4637-87d5-a92a34ad684d",
    "project_id": "cfd8b048-cac1-4bf4-a47d-cdcc731e4a89",
    "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
}
/v2/projects/{project_id}/drawings/{drawing_id}
PUT /v2/projects/{project_id}/drawings/{drawing_id}

Create a new drawing instance

Parameters
  • project_id: Project UUID
  • drawing_id: Drawing UUID
Response status codes
  • 201: Drawing updated
  • 400: Invalid request
Input
Name Mandatory Type Description
drawing_id string Drawing UUID
project_id string Project UUID
rotation integer Rotation of the element
svg string SVG content of the drawing
x integer X property
y integer Y property
z integer Z property
Output
Name Mandatory Type Description
drawing_id string Drawing UUID
project_id string Project UUID
rotation integer Rotation of the element
svg string SVG content of the drawing
x integer X property
y integer Y property
z integer Z property
Sample session
curl -i -X PUT 'http://localhost:3080/v2/projects/8f53f0f7-9967-4a01-884f-36ea1800e5ef/drawings/d86ab88f-28bf-4f22-aa4e-e6d3c423b98c' -d '{"x": 42}'

PUT /v2/projects/8f53f0f7-9967-4a01-884f-36ea1800e5ef/drawings/d86ab88f-28bf-4f22-aa4e-e6d3c423b98c HTTP/1.1
{
    "x": 42
}


HTTP/1.1 201
Connection: close
Content-Length: 323
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:56 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/drawings/{drawing_id}

{
    "drawing_id": "d86ab88f-28bf-4f22-aa4e-e6d3c423b98c",
    "project_id": "8f53f0f7-9967-4a01-884f-36ea1800e5ef",
    "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": 42,
    "y": 20,
    "z": 0
}
DELETE /v2/projects/{project_id}/drawings/{drawing_id}

Delete a drawing instance

Parameters
  • project_id: Project UUID
  • drawing_id: Drawing UUID
Response status codes
  • 204: Drawing deleted
  • 400: Invalid request
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/projects/24ef7002-5dd6-4054-bf8a-d2aface0885e/drawings/b2f8b12f-a4cc-4621-affc-cf3dcd4ba513'

DELETE /v2/projects/24ef7002-5dd6-4054-bf8a-d2aface0885e/drawings/b2f8b12f-a4cc-4621-affc-cf3dcd4ba513 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:56 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/drawings/{drawing_id}

Gns3 vm
/v2/gns3vm
GET /v2/gns3vm

Get GNS3 VM settings

Response status codes
  • 200: GNS3 VM settings returned
Sample session
curl -i -X GET 'http://localhost:3080/v2/gns3vm'

GET /v2/gns3vm HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 148
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:57 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/gns3vm

{
    "enable": false,
    "engine": "vmware",
    "headless": false,
    "ram": 2048,
    "vcpus": 1,
    "vmname": null,
    "when_exit": "stop"
}
PUT /v2/gns3vm

Update GNS3 VM settings

Response status codes
  • 201: GNS3 VM updated
Sample session
curl -i -X PUT 'http://localhost:3080/v2/gns3vm' -d '{"vmname": "TEST VM"}'

PUT /v2/gns3vm HTTP/1.1
{
    "vmname": "TEST VM"
}


HTTP/1.1 201
Connection: close
Content-Length: 27
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:57 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/gns3vm

{
    "vmname": "TEST VM"
}
/v2/gns3vm/engines
GET /v2/gns3vm/engines

Return the list of engines supported for the GNS3VM

Sample session
curl -i -X GET 'http://localhost:3080/v2/gns3vm/engines'

GET /v2/gns3vm/engines HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 1110
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:57 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/gns3vm/engines

[
    {
        "description": "VMware is the recommended choice for best performances.<br>The GNS3 VM can be <a href=\"https://github.com/GNS3/gns3-gui/releases/download/v2.0.0dev11/GNS3.VM.VMware.Workstation.2.0.0dev11.zip\">downloaded here</a>.",
        "engine_id": "vmware",
        "name": "VMware Fusion",
        "support_headless": true,
        "support_ram": true,
        "support_when_exit": true
    },
    {
        "description": "VirtualBox doesn't support nested virtualization, this means running Qemu based VM could be very slow.<br>The GNS3 VM can be <a href=\"https://github.com/GNS3/gns3-gui/releases/download/v2.0.0dev11/GNS3.VM.VirtualBox.2.0.0dev11.zip\">downloaded here</a>",
        "engine_id": "virtualbox",
        "name": "VirtualBox",
        "support_headless": true,
        "support_ram": true,
        "support_when_exit": true
    },
    {
        "description": "Use a remote GNS3 server as the GNS3 VM.",
        "engine_id": "remote",
        "name": "Remote",
        "support_headless": false,
        "support_ram": false,
        "support_when_exit": false
    }
]
/v2/gns3vm/engines/{engine}/vms
GET /v2/gns3vm/engines/{engine}/vms

Get all the available VMs for a specific virtualization engine

Parameters
  • engine: Virtualization engine name
Response status codes
  • 200: Success
  • 400: Invalid request
Sample session
curl -i -X GET 'http://localhost:3080/v2/gns3vm/engines/vmware/vms'

GET /v2/gns3vm/engines/vmware/vms HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 40
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:57 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/gns3vm/engines/{engine}/vms

[
    {
        "vmname": "test"
    }
]
Node
/v2/projects/{project_id}/nodes
POST /v2/projects/{project_id}/nodes

Create a new node instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
Input
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/9f93fd51-3c14-44aa-ba4c-14e5b18869c3/nodes' -d '{"compute_id": "example.com", "name": "test", "node_type": "vpcs", "properties": {"startup_script": "echo test"}}'

POST /v2/projects/9f93fd51-3c14-44aa-ba4c-14e5b18869c3/nodes HTTP/1.1
{
    "compute_id": "example.com",
    "name": "test",
    "node_type": "vpcs",
    "properties": {
        "startup_script": "echo test"
    }
}


HTTP/1.1 201
Connection: close
Content-Length: 1123
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes

{
    "command_line": null,
    "compute_id": "example.com",
    "console": 2048,
    "console_host": "<MagicMock name='mock.console_host' id='4439827960'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "6bf6a6b4-0684-4beb-9e59-c750eb7de03c",
    "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": "9f93fd51-3c14-44aa-ba4c-14e5b18869c3",
    "properties": {
        "startup_script": "echo test"
    },
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
GET /v2/projects/{project_id}/nodes

List nodes of a project

Parameters
  • project_id: Project UUID
Response status codes
  • 200: List of nodes returned
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/387fb37d-314e-43b4-8fbd-4f1266662100/nodes'

GET /v2/projects/387fb37d-314e-43b4-8fbd-4f1266662100/nodes HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 1303
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes

[
    {
        "command_line": null,
        "compute_id": "example.com",
        "console": 2048,
        "console_host": "<MagicMock name='mock.console_host' id='4439344576'>",
        "console_type": null,
        "first_port_name": null,
        "height": 59,
        "label": {
            "rotation": 0,
            "style": "font-size: 10;font-familly: Verdana",
            "text": "test",
            "x": null,
            "y": -40
        },
        "name": "test",
        "node_directory": null,
        "node_id": "af74aa64-c387-4903-9879-16e5fe26c0df",
        "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": "387fb37d-314e-43b4-8fbd-4f1266662100",
        "properties": {
            "startup_script": "echo test"
        },
        "status": "stopped",
        "symbol": ":/symbols/computer.svg",
        "width": 65,
        "x": 0,
        "y": 0,
        "z": 0
    }
]
/v2/projects/{project_id}/nodes/{node_id}
GET /v2/projects/{project_id}/nodes/{node_id}

Update a node instance

Response status codes
  • 200: Node found
  • 400: Invalid request
  • 404: Node doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/b97cbb09-8eef-4def-b338-ab29d9942bc2/nodes/8d4fce2b-5b61-446d-b7a7-93b07e4cabac'

GET /v2/projects/b97cbb09-8eef-4def-b338-ab29d9942bc2/nodes/8d4fce2b-5b61-446d-b7a7-93b07e4cabac HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 1123
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}

{
    "command_line": null,
    "compute_id": "example.com",
    "console": 2048,
    "console_host": "<MagicMock name='mock.console_host' id='4434431336'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "8d4fce2b-5b61-446d-b7a7-93b07e4cabac",
    "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": "b97cbb09-8eef-4def-b338-ab29d9942bc2",
    "properties": {
        "startup_script": "echo test"
    },
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
PUT /v2/projects/{project_id}/nodes/{node_id}

Update a node instance

Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X PUT 'http://localhost:3080/v2/projects/2071abcf-98b8-42b8-a6e7-6e0e5571e223/nodes/86b1aa27-5c82-4596-8246-3f7384f853a1' -d '{"compute_id": "example.com", "name": "test", "node_type": "vpcs", "properties": {"startup_script": "echo test"}}'

PUT /v2/projects/2071abcf-98b8-42b8-a6e7-6e0e5571e223/nodes/86b1aa27-5c82-4596-8246-3f7384f853a1 HTTP/1.1
{
    "compute_id": "example.com",
    "name": "test",
    "node_type": "vpcs",
    "properties": {
        "startup_script": "echo test"
    }
}


HTTP/1.1 200
Connection: close
Content-Length: 1080
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}

{
    "command_line": null,
    "compute_id": "example.com",
    "console": 2048,
    "console_host": "<MagicMock name='mock.console_host' id='4433145248'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "86b1aa27-5c82-4596-8246-3f7384f853a1",
    "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": "2071abcf-98b8-42b8-a6e7-6e0e5571e223",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
DELETE /v2/projects/{project_id}/nodes/{node_id}

Delete a node instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/projects/856d9a5f-f0fc-4a14-ab9c-6cd61abde4f6/nodes/5d7c89f2-3a82-4ad5-918d-798dc70aefb3'

DELETE /v2/projects/856d9a5f-f0fc-4a14-ab9c-6cd61abde4f6/nodes/5d7c89f2-3a82-4ad5-918d-798dc70aefb3 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}

/v2/projects/{project_id}/nodes/{node_id}/dynamips/auto_idlepc
GET /v2/projects/{project_id}/nodes/{node_id}/dynamips/auto_idlepc

Compute the IDLE PC for a Dynamips node

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/5892e20f-136f-4a75-821d-004f039a7db4/nodes/3e529564-a1cd-4852-a4cc-2193da8782df/dynamips/auto_idlepc'

GET /v2/projects/5892e20f-136f-4a75-821d-004f039a7db4/nodes/3e529564-a1cd-4852-a4cc-2193da8782df/dynamips/auto_idlepc HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 30
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/dynamips/auto_idlepc

{
    "idlepc": "0x60606f54"
}
/v2/projects/{project_id}/nodes/{node_id}/dynamips/idlepc_proposals
GET /v2/projects/{project_id}/nodes/{node_id}/dynamips/idlepc_proposals

Compute a list of potential idle PC for a node

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/f6d48c79-bbf2-48e9-87dd-706fcf40eb7b/nodes/3a1aa9c0-8ea9-4372-874a-412edc9022d5/dynamips/idlepc_proposals'

GET /v2/projects/f6d48c79-bbf2-48e9-87dd-706fcf40eb7b/nodes/3a1aa9c0-8ea9-4372-874a-412edc9022d5/dynamips/idlepc_proposals HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 38
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:01 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/dynamips/idlepc_proposals

[
    "0x60606f54",
    "0x33805a22"
]
/v2/projects/{project_id}/nodes/{node_id}/reload
POST /v2/projects/{project_id}/nodes/{node_id}/reload

Reload a node instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/9308ed57-be12-456a-b03e-8cd5540ddd57/nodes/106ec4fa-bda5-4de7-9047-c8343699c9df/reload' -d '{}'

POST /v2/projects/9308ed57-be12-456a-b03e-8cd5540ddd57/nodes/106ec4fa-bda5-4de7-9047-c8343699c9df/reload HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 1080
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/reload

{
    "command_line": null,
    "compute_id": "example.com",
    "console": null,
    "console_host": "<MagicMock name='mock.console_host' id='4444729808'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "106ec4fa-bda5-4de7-9047-c8343699c9df",
    "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": "9308ed57-be12-456a-b03e-8cd5540ddd57",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
/v2/projects/{project_id}/nodes/{node_id}/start
POST /v2/projects/{project_id}/nodes/{node_id}/start

Start a node instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/f1fdf311-f82e-45eb-a9c3-af5502e3d8ff/nodes/051900ed-fcca-4a60-a880-c3fd0fb8bada/start' -d '{}'

POST /v2/projects/f1fdf311-f82e-45eb-a9c3-af5502e3d8ff/nodes/051900ed-fcca-4a60-a880-c3fd0fb8bada/start HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 1080
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/start

{
    "command_line": null,
    "compute_id": "example.com",
    "console": null,
    "console_host": "<MagicMock name='mock.console_host' id='4443942864'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "051900ed-fcca-4a60-a880-c3fd0fb8bada",
    "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": "f1fdf311-f82e-45eb-a9c3-af5502e3d8ff",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
/v2/projects/{project_id}/nodes/{node_id}/stop
POST /v2/projects/{project_id}/nodes/{node_id}/stop

Stop a node instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/be72d628-c67d-47ff-bcd2-ace813efcfce/nodes/cb7b936c-ad81-46e8-9dd4-28bd8e9f53ef/stop' -d '{}'

POST /v2/projects/be72d628-c67d-47ff-bcd2-ace813efcfce/nodes/cb7b936c-ad81-46e8-9dd4-28bd8e9f53ef/stop HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 1080
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/stop

{
    "command_line": null,
    "compute_id": "example.com",
    "console": null,
    "console_host": "<MagicMock name='mock.console_host' id='4444255232'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "cb7b936c-ad81-46e8-9dd4-28bd8e9f53ef",
    "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": "be72d628-c67d-47ff-bcd2-ace813efcfce",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
/v2/projects/{project_id}/nodes/{node_id}/suspend
POST /v2/projects/{project_id}/nodes/{node_id}/suspend

Suspend a node instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance suspended
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/072f522f-9b04-4137-9e70-66c04b1c7d5c/nodes/8a9ab8d0-3491-4823-a165-0e4229eef451/suspend' -d '{}'

POST /v2/projects/072f522f-9b04-4137-9e70-66c04b1c7d5c/nodes/8a9ab8d0-3491-4823-a165-0e4229eef451/suspend HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 1080
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/{node_id}/suspend

{
    "command_line": null,
    "compute_id": "example.com",
    "console": null,
    "console_host": "<MagicMock name='mock.console_host' id='4443681904'>",
    "console_type": null,
    "first_port_name": null,
    "height": 59,
    "label": {
        "rotation": 0,
        "style": "font-size: 10;font-familly: Verdana",
        "text": "test",
        "x": null,
        "y": -40
    },
    "name": "test",
    "node_directory": null,
    "node_id": "8a9ab8d0-3491-4823-a165-0e4229eef451",
    "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": "072f522f-9b04-4137-9e70-66c04b1c7d5c",
    "properties": {},
    "status": "stopped",
    "symbol": ":/symbols/computer.svg",
    "width": 65,
    "x": 0,
    "y": 0,
    "z": 0
}
/v2/projects/{project_id}/nodes/reload
POST /v2/projects/{project_id}/nodes/reload

Reload all nodes belonging to the project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: All nodes successfully reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/815d273f-becd-43f1-919f-25d1f18fa016/nodes/reload' -d '{}'

POST /v2/projects/815d273f-becd-43f1-919f-25d1f18fa016/nodes/reload HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:32:00 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/reload

/v2/projects/{project_id}/nodes/start
POST /v2/projects/{project_id}/nodes/start

Start all nodes belonging to the project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: All nodes successfully started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/2a2af1f9-c4c6-4c5a-8e4b-f7dae87aa23a/nodes/start' -d '{}'

POST /v2/projects/2a2af1f9-c4c6-4c5a-8e4b-f7dae87aa23a/nodes/start HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/start

/v2/projects/{project_id}/nodes/stop
POST /v2/projects/{project_id}/nodes/stop

Stop all nodes belonging to the project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: All nodes successfully stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/64f23d4a-961e-415b-bf20-4920518c0fb9/nodes/stop' -d '{}'

POST /v2/projects/64f23d4a-961e-415b-bf20-4920518c0fb9/nodes/stop HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/stop

/v2/projects/{project_id}/nodes/suspend
POST /v2/projects/{project_id}/nodes/suspend

Suspend all nodes belonging to the project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: All nodes successfully suspended
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line ['null', 'string'] Command line use to start the node
compute_id string Compute identifier
console ['integer', 'null'] Console TCP port
console_host string Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.
console_type enum Possible values: vnc, telnet, http, null
first_port_name ['string', 'null'] Name of the first port
height integer Height of the node (Read only)
label object
name string Node name
node_directory ['null', 'string'] Working directory of the node. Read only
node_id string Node UUID
node_type enum Possible values: cloud, nat, ethernet_hub, ethernet_switch, frame_relay_switch, atm_switch, docker, dynamips, vpcs, virtualbox, vmware, iou, qemu
port_name_format string Formating for port name {0} will be replace by port number
port_segment_size integer Size of the port segment
ports array List of node ports READ only
project_id string Project UUID
properties object Properties specific to an emulator
status enum Possible values: stopped, started, suspended
symbol ['string', 'null'] Symbol of the node
width integer Width of the node (Read only)
x integer X position of the node
y integer Y position of the node
z integer Z position of the node
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/6e4d2757-cd4c-4026-9dcb-58a032ee0ba9/nodes/suspend' -d '{}'

POST /v2/projects/6e4d2757-cd4c-4026-9dcb-58a032ee0ba9/nodes/suspend HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:59 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/nodes/suspend

Project
/v2/projects
POST /v2/projects

Create a new project on the server

Response status codes
  • 201: Project created
  • 409: Project already created
Input
Name Mandatory Type Description
auto_close boolean Project auto close
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id ['string', 'null'] Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects' -d '{"name": "test", "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"}'

POST /v2/projects HTTP/1.1
{
    "name": "test",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"
}


HTTP/1.1 201
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:01 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpvvmlo0a7/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
GET /v2/projects

List projects

Response status codes
  • 200: List of projects
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects'

GET /v2/projects HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 428
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:01 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects

[
    {
        "auto_close": true,
        "auto_open": false,
        "auto_start": false,
        "filename": "test.gns3",
        "name": "test",
        "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_list_projects1",
        "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f",
        "scene_height": 1000,
        "scene_width": 2000,
        "status": "opened"
    }
]
/v2/projects/load
POST /v2/projects/load

Open a project (only local server)

Parameters
  • path: .gns3 path
Response status codes
  • 201: The project has been opened
  • 403: The server is not the local server
Input
Name Mandatory Type Description
path string .gns3 path
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/load' -d '{"path": "/tmp/test.gns3"}'

POST /v2/projects/load HTTP/1.1
{
    "path": "/tmp/test.gns3"
}


HTTP/1.1 201
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:02 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/load

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpdmzj8ewe/projects/6f6fbad5-35c3-4138-82bd-42ba3d91d686",
    "project_id": "6f6fbad5-35c3-4138-82bd-42ba3d91d686",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
/v2/projects/{project_id}
GET /v2/projects/{project_id}

Get a project

Parameters
  • project_id: Project UUID
Response status codes
  • 200: Project information returned
  • 404: The project doesn’t exist
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/30013d5e-b284-4098-a12b-435d9ffdfc50'

GET /v2/projects/30013d5e-b284-4098-a12b-435d9ffdfc50 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:02 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpoa69sgpa/projects/30013d5e-b284-4098-a12b-435d9ffdfc50",
    "project_id": "30013d5e-b284-4098-a12b-435d9ffdfc50",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
PUT /v2/projects/{project_id}

Update a project instance

Response status codes
  • 200: Node updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
name ['string', 'null'] Project name
path ['string', 'null'] Path of the project on the server (work only with --local)
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X PUT 'http://localhost:3080/v2/projects/10010203-0405-0607-0809-0a0b0c0d0e0f' -d '{"name": "test2"}'

PUT /v2/projects/10010203-0405-0607-0809-0a0b0c0d0e0f HTTP/1.1
{
    "name": "test2"
}


HTTP/1.1 200
Connection: close
Content-Length: 380
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:01 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test2",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpe4g8gdv7/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
DELETE /v2/projects/{project_id}

Delete a project from disk

Parameters
  • project_id: Project UUID
Response status codes
  • 204: Changes have been written on disk
  • 404: The project doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/projects/1dec0fc5-4480-403e-b86a-3c356920a828'

DELETE /v2/projects/1dec0fc5-4480-403e-b86a-3c356920a828 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:32:02 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}

/v2/projects/{project_id}/close
POST /v2/projects/{project_id}/close

Close a project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: The project has been closed
  • 404: The project doesn’t exist
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/c9676cae-5a4b-45f7-a579-e95a094a34c5/close' -d '{}'

POST /v2/projects/c9676cae-5a4b-45f7-a579-e95a094a34c5/close HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:02 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/close

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcc0rph8f/projects/c9676cae-5a4b-45f7-a579-e95a094a34c5",
    "project_id": "c9676cae-5a4b-45f7-a579-e95a094a34c5",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
/v2/projects/{project_id}/duplicate
POST /v2/projects/{project_id}/duplicate

Duplicate a project

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Project duplicate
  • 403: The server is not the local server
  • 404: The project doesn’t exist
Input
Name Mandatory Type Description
auto_close boolean Project auto close
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id ['string', 'null'] Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/6f0141f9-5caa-4650-afd8-823df4aa7f8f/duplicate' -d '{"name": "hello"}'

POST /v2/projects/6f0141f9-5caa-4650-afd8-823df4aa7f8f/duplicate HTTP/1.1
{
    "name": "hello"
}


HTTP/1.1 201
Connection: close
Content-Length: 350
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:03 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/duplicate

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "hello.gns3",
    "name": "hello",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp04wueli7/projects/hello",
    "project_id": "2f6d7639-ba59-44b8-a0b9-cbe62c48c2be",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "closed"
}
/v2/projects/{project_id}/files/{path:.+}
GET /v2/projects/{project_id}/files/{path:.+}

Get a file from a project. Beware you have warranty to be able to access only to file global to the project (for example README.txt)

Parameters
  • project_id: Project UUID
Response status codes
  • 200: File returned
  • 403: Permission denied
  • 404: The file doesn’t exist
POST /v2/projects/{project_id}/files/{path:.+}

Write a file to a project

Parameters
  • project_id: Project UUID
Response status codes
  • 200: File returned
  • 403: Permission denied
  • 404: The path doesn’t exist
/v2/projects/{project_id}/import
POST /v2/projects/{project_id}/import

Import a project from a portable archive

Parameters
  • project_id: Project UUID
Response status codes
  • 200: Project imported
  • 403: Forbidden to import project
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
/v2/projects/{project_id}/open
POST /v2/projects/{project_id}/open

Open a project

Parameters
  • project_id: Project UUID
Response status codes
  • 201: The project has been opened
  • 404: The project doesn’t exist
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/17cf04b6-bd2f-4c10-b2de-9de04f2c1169/open' -d '{}'

POST /v2/projects/17cf04b6-bd2f-4c10-b2de-9de04f2c1169/open HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:02 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/open

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpymtoa9p4/projects/17cf04b6-bd2f-4c10-b2de-9de04f2c1169",
    "project_id": "17cf04b6-bd2f-4c10-b2de-9de04f2c1169",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
Server
/v2/debug
POST /v2/debug

Dump debug informations to disk (debug directory in config directory). Work only for local server

/v2/settings
GET /v2/settings

Retrieve gui settings from the server. Temporary will we removed in later release

Sample session
curl -i -X GET 'http://localhost:3080/v2/settings'

GET /v2/settings HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 20
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/settings

{
    "test": true
}
POST /v2/settings

Write gui settings on the server. Temporary will we removed in later releas

Sample session
curl -i -X POST 'http://localhost:3080/v2/settings' -d '{"test": true}'

POST /v2/settings HTTP/1.1
{
    "test": true
}


HTTP/1.1 201
Connection: close
Content-Length: 20
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/settings

{
    "test": true
}
/v2/shutdown
POST /v2/shutdown

Shutdown the local server

Response status codes
  • 201: Server is shutting down
  • 403: Server shutdown refused
Sample session
curl -i -X POST 'http://localhost:3080/v2/shutdown' -d '{}'

POST /v2/shutdown HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:32:03 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/shutdown

/v2/version
GET /v2/version

Retrieve the server version number

Output
Name Mandatory Type Description
local boolean Whether this is a local server or not
version string Version number
Sample session
curl -i -X GET 'http://localhost:3080/v2/version'

GET /v2/version HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 50
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:05 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/version

{
    "local": true,
    "version": "2.0.0dev11"
}
POST /v2/version

Check if version is the same as the server

Response status codes
  • 200: Same version
  • 409: Invalid version
Input
Name Mandatory Type Description
local boolean Whether this is a local server or not
version string Version number
Output
Name Mandatory Type Description
local boolean Whether this is a local server or not
version string Version number
Sample session
curl -i -X POST 'http://localhost:3080/v2/version' -d '{"version": "2.0.0dev11"}'

POST /v2/version HTTP/1.1
{
    "version": "2.0.0dev11"
}


HTTP/1.1 200
Connection: close
Content-Length: 31
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:05 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/version

{
    "version": "2.0.0dev11"
}
Snapshot
/v2/projects/{project_id}/snapshots
POST /v2/projects/{project_id}/snapshots

Create snapshot of a project

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Snasphot created
  • 404: The project doesn’t exist
Input
Name Mandatory Type Description
name Snapshot name
Output
Name Mandatory Type Description
created_at integer Date of the snapshot (UTC timestamp)
name string Project name
project_id string Project UUID
snapshot_id string Snapshot UUID
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/ca0187d8-c183-49b1-a714-b7160264172b/snapshots' -d '{"name": "snap1"}'

POST /v2/projects/ca0187d8-c183-49b1-a714-b7160264172b/snapshots HTTP/1.1
{
    "name": "snap1"
}


HTTP/1.1 201
Connection: close
Content-Length: 170
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots

{
    "created_at": 1490088724,
    "name": "snap1",
    "project_id": "ca0187d8-c183-49b1-a714-b7160264172b",
    "snapshot_id": "b5fed8f7-3482-435c-9df0-d25b9afa9cec"
}
GET /v2/projects/{project_id}/snapshots

List snapshots of a project

Parameters
  • project_id: Project UUID
Response status codes
  • 200: Snasphot list returned
  • 404: The project doesn’t exist
Sample session
curl -i -X GET 'http://localhost:3080/v2/projects/ea93460a-c843-4c89-b8ad-5cfd322292fc/snapshots'

GET /v2/projects/ea93460a-c843-4c89-b8ad-5cfd322292fc/snapshots HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 197
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots

[
    {
        "created_at": 1490088724,
        "name": "test",
        "project_id": "ea93460a-c843-4c89-b8ad-5cfd322292fc",
        "snapshot_id": "2f250c44-3f80-437a-bac7-b03e66e0482a"
    }
]
/v2/projects/{project_id}/snapshots/{snapshot_id}
DELETE /v2/projects/{project_id}/snapshots/{snapshot_id}

Delete a snapshot from disk

Parameters
  • project_id: Project UUID
  • snapshot_id: Snasphot UUID
Response status codes
  • 204: Changes have been written on disk
  • 404: The project or snapshot doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/projects/c84befb2-e203-4357-9958-770bd92cb1f2/snapshots/c65dfead-1080-45a1-85bf-57b0fe5983a2'

DELETE /v2/projects/c84befb2-e203-4357-9958-770bd92cb1f2/snapshots/c65dfead-1080-45a1-85bf-57b0fe5983a2 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots/{snapshot_id}

/v2/projects/{project_id}/snapshots/{snapshot_id}/restore
POST /v2/projects/{project_id}/snapshots/{snapshot_id}/restore

Restore a snapshot from disk

Parameters
  • project_id: Project UUID
  • snapshot_id: Snasphot UUID
Response status codes
  • 201: The snapshot has been restored
  • 404: The project or snapshot doesn’t exist
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/projects/ecb64cf5-aec7-469a-a367-3d16f4377cd7/snapshots/7e0bb824-e0aa-4ff1-b4f8-8453e99cb1bd/restore' -d '{}'

POST /v2/projects/ecb64cf5-aec7-469a-a367-3d16f4377cd7/snapshots/7e0bb824-e0aa-4ff1-b4f8-8453e99cb1bd/restore HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 379
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots/{snapshot_id}/restore

{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "filename": "test.gns3",
    "name": "test",
    "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp3anabqsm/projects/ecb64cf5-aec7-469a-a367-3d16f4377cd7",
    "project_id": "ecb64cf5-aec7-469a-a367-3d16f4377cd7",
    "scene_height": 1000,
    "scene_width": 2000,
    "status": "opened"
}
Symbol
/v2/symbols
GET /v2/symbols

List of symbols

Response status codes
  • 200: Symbols list returned
Sample session
curl -i -X GET 'http://localhost:3080/v2/symbols'

GET /v2/symbols HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 5174
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:05 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/symbols

[
    {
        "builtin": true,
        "filename": "PBX.svg",
        "symbol_id": ":/symbols/PBX.svg"
    },
    {
        "builtin": true,
        "filename": "PIX_firewall.svg",
        "symbol_id": ":/symbols/PIX_firewall.svg"
    },
    {
        "builtin": true,
        "filename": "access_point.svg",
        "symbol_id": ":/symbols/access_point.svg"
    },
    {
        "builtin": true,
        "filename": "access_server.svg",
        "symbol_id": ":/symbols/access_server.svg"
    },
    {
        "builtin": true,
        "filename": "asa.svg",
        "symbol_id": ":/symbols/asa.svg"
    },
    {
        "builtin": true,
        "filename": "atm_bridge.svg",
        "symbol_id": ":/symbols/atm_bridge.svg"
    },
    {
        "builtin": true,
        "filename": "atm_switch.svg",
        "symbol_id": ":/symbols/atm_switch.svg"
    },
    {
        "builtin": true,
        "filename": "call_manager.svg",
        "symbol_id": ":/symbols/call_manager.svg"
    },
    {
        "builtin": true,
        "filename": "cloud.svg",
        "symbol_id": ":/symbols/cloud.svg"
    },
    {
        "builtin": true,
        "filename": "computer.svg",
        "symbol_id": ":/symbols/computer.svg"
    },
    {
        "builtin": true,
        "filename": "docker_guest.svg",
        "symbol_id": ":/symbols/docker_guest.svg"
    },
    {
        "builtin": true,
        "filename": "dslam.svg",
        "symbol_id": ":/symbols/dslam.svg"
    },
    {
        "builtin": true,
        "filename": "edge_label_switch_router.svg",
        "symbol_id": ":/symbols/edge_label_switch_router.svg"
    },
    {
        "builtin": true,
        "filename": "ethernet_switch.svg",
        "symbol_id": ":/symbols/ethernet_switch.svg"
    },
    {
        "builtin": true,
        "filename": "firewall.svg",
        "symbol_id": ":/symbols/firewall.svg"
    },
    {
        "builtin": true,
        "filename": "frame_relay_switch.svg",
        "symbol_id": ":/symbols/frame_relay_switch.svg"
    },
    {
        "builtin": true,
        "filename": "gateway.svg",
        "symbol_id": ":/symbols/gateway.svg"
    },
    {
        "builtin": true,
        "filename": "hub.svg",
        "symbol_id": ":/symbols/hub.svg"
    },
    {
        "builtin": true,
        "filename": "ids.svg",
        "symbol_id": ":/symbols/ids.svg"
    },
    {
        "builtin": true,
        "filename": "iosv_l2_virl.svg",
        "symbol_id": ":/symbols/iosv_l2_virl.svg"
    },
    {
        "builtin": true,
        "filename": "iosv_virl.svg",
        "symbol_id": ":/symbols/iosv_virl.svg"
    },
    {
        "builtin": true,
        "filename": "ip_phone.svg",
        "symbol_id": ":/symbols/ip_phone.svg"
    },
    {
        "builtin": true,
        "filename": "label_switch_router.svg",
        "symbol_id": ":/symbols/label_switch_router.svg"
    },
    {
        "builtin": true,
        "filename": "lightweight_ap.svg",
        "symbol_id": ":/symbols/lightweight_ap.svg"
    },
    {
        "builtin": true,
        "filename": "multilayer_switch.svg",
        "symbol_id": ":/symbols/multilayer_switch.svg"
    },
    {
        "builtin": true,
        "filename": "optical_router.svg",
        "symbol_id": ":/symbols/optical_router.svg"
    },
    {
        "builtin": true,
        "filename": "printer.svg",
        "symbol_id": ":/symbols/printer.svg"
    },
    {
        "builtin": true,
        "filename": "qemu_guest.svg",
        "symbol_id": ":/symbols/qemu_guest.svg"
    },
    {
        "builtin": true,
        "filename": "route_switch_processor.svg",
        "symbol_id": ":/symbols/route_switch_processor.svg"
    },
    {
        "builtin": true,
        "filename": "router.awp.svg",
        "symbol_id": ":/symbols/router.awp.svg"
    },
    {
        "builtin": true,
        "filename": "router.svg",
        "symbol_id": ":/symbols/router.svg"
    },
    {
        "builtin": true,
        "filename": "router_firewall.svg",
        "symbol_id": ":/symbols/router_firewall.svg"
    },
    {
        "builtin": true,
        "filename": "router_netflow.svg",
        "symbol_id": ":/symbols/router_netflow.svg"
    },
    {
        "builtin": true,
        "filename": "server.svg",
        "symbol_id": ":/symbols/server.svg"
    },
    {
        "builtin": true,
        "filename": "sip_server.svg",
        "symbol_id": ":/symbols/sip_server.svg"
    },
    {
        "builtin": true,
        "filename": "vbox_guest.svg",
        "symbol_id": ":/symbols/vbox_guest.svg"
    },
    {
        "builtin": true,
        "filename": "vmware_guest.svg",
        "symbol_id": ":/symbols/vmware_guest.svg"
    },
    {
        "builtin": true,
        "filename": "voice_access_server.svg",
        "symbol_id": ":/symbols/voice_access_server.svg"
    },
    {
        "builtin": true,
        "filename": "voice_router.svg",
        "symbol_id": ":/symbols/voice_router.svg"
    },
    {
        "builtin": true,
        "filename": "vpcs_guest.svg",
        "symbol_id": ":/symbols/vpcs_guest.svg"
    },
    {
        "builtin": true,
        "filename": "wlan_controller.svg",
        "symbol_id": ":/symbols/wlan_controller.svg"
    }
]

Compute API Endpoints

The compute is the GNS3 process running on a server and controlling the VM process.

Warning

Consider this endpoints as a private API used by the controller.

Atm switch
/v2/compute/projects/{project_id}/atm_switch/nodes
POST /v2/compute/projects/{project_id}/atm_switch/nodes

Create a new ATM switch instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
mappings object ATM mappings
name string ATM switch name
node_id Node UUID
Output
Name Mandatory Type Description
mappings object ATM mappings
name string ATM switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
/v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}
GET /v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}

Get an ATM switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
mappings object ATM mappings
name string ATM switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
PUT /v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}

Update an ATM switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
mappings object ATM mappings
name string ATM switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
mappings object ATM mappings
name string ATM switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
DELETE /v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}

Delete an ATM switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/atm_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on an ATM switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the switch (always 0)
  • port_number: Port on the switch
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Capabilities
/v2/compute/capabilities
GET /v2/compute/capabilities

Retrieve the capabilities of the server

Output
Name Mandatory Type Description
node_types array Node type supported by the compute
platform string Platform where the compute is running
version ['string', 'null'] Version number
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/capabilities'

GET /v2/compute/capabilities HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 348
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/capabilities

{
    "node_types": [
        "cloud",
        "ethernet_hub",
        "ethernet_switch",
        "nat",
        "vpcs",
        "virtualbox",
        "dynamips",
        "frame_relay_switch",
        "atm_switch",
        "qemu",
        "vmware",
        "docker",
        "iou"
    ],
    "platform": "linuxdebian",
    "version": "2.0.0dev11"
}
Cloud
/v2/compute/projects/{project_id}/cloud/nodes
POST /v2/compute/projects/{project_id}/cloud/nodes

Create a new cloud instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Types
HostInterfaces

Interfaces on this host

Name Mandatory Type Description
name string Interface name
special boolean If true the interface is non standard (firewire for example)
type enum Possible values: ethernet, tap
Body
Name Mandatory Type Description
interfaces array
name string Cloud name
node_id Node UUID
ports_mapping array
Output
Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes' -d '{"name": "Cloud 1"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes HTTP/1.1
{
    "name": "Cloud 1"
}


HTTP/1.1 201
Connection: close
Content-Length: 3855
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes

{
    "interfaces": [
        {
            "name": "bridge0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "en0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en1",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en2",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "fw0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "lo0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "p2p0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "utun0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "vboxnet0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet10",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet8",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet9",
            "special": true,
            "type": "ethernet"
        }
    ],
    "name": "Cloud 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/builtin/c435790d-867a-4e10-8c1c-7faa9b0f8700",
    "node_id": "c435790d-867a-4e10-8c1c-7faa9b0f8700",
    "ports_mapping": [
        {
            "interface": "en0",
            "name": "en0",
            "port_number": 0,
            "type": "ethernet"
        },
        {
            "interface": "en1",
            "name": "en1",
            "port_number": 1,
            "type": "ethernet"
        },
        {
            "interface": "en2",
            "name": "en2",
            "port_number": 2,
            "type": "ethernet"
        },
        {
            "interface": "utun0",
            "name": "utun0",
            "port_number": 3,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
/v2/compute/projects/{project_id}/cloud/nodes/{node_id}
GET /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Get a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/689c58e7-9112-4d4f-b5ea-37c5b478c332'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/689c58e7-9112-4d4f-b5ea-37c5b478c332 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 3855
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

{
    "interfaces": [
        {
            "name": "bridge0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "en0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en1",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en2",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "fw0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "lo0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "p2p0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "utun0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "vboxnet0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet10",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet8",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet9",
            "special": true,
            "type": "ethernet"
        }
    ],
    "name": "Cloud 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/builtin/689c58e7-9112-4d4f-b5ea-37c5b478c332",
    "node_id": "689c58e7-9112-4d4f-b5ea-37c5b478c332",
    "ports_mapping": [
        {
            "interface": "en0",
            "name": "en0",
            "port_number": 0,
            "type": "ethernet"
        },
        {
            "interface": "en1",
            "name": "en1",
            "port_number": 1,
            "type": "ethernet"
        },
        {
            "interface": "en2",
            "name": "en2",
            "port_number": 2,
            "type": "ethernet"
        },
        {
            "interface": "utun0",
            "name": "utun0",
            "port_number": 3,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
PUT /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Update a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Types
HostInterfaces

Interfaces on this host

Name Mandatory Type Description
name string Interface name
special boolean If true the interface is non standard (firewire for example)
type enum Possible values: ethernet, tap
Body
Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
interfaces array
name string Cloud name
node_directory string Path to the VM working directory
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/35d71fe5-356d-440e-a170-d88e35258f06' -d '{"name": "test"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/35d71fe5-356d-440e-a170-d88e35258f06 HTTP/1.1
{
    "name": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 3852
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:41 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

{
    "interfaces": [
        {
            "name": "bridge0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "en0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en1",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "en2",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "fw0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "lo0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "p2p0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "utun0",
            "special": false,
            "type": "ethernet"
        },
        {
            "name": "vboxnet0",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vboxnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet1",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet10",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet2",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet3",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet4",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet5",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet6",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet7",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet8",
            "special": true,
            "type": "ethernet"
        },
        {
            "name": "vmnet9",
            "special": true,
            "type": "ethernet"
        }
    ],
    "name": "test",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/builtin/35d71fe5-356d-440e-a170-d88e35258f06",
    "node_id": "35d71fe5-356d-440e-a170-d88e35258f06",
    "ports_mapping": [
        {
            "interface": "en0",
            "name": "en0",
            "port_number": 0,
            "type": "ethernet"
        },
        {
            "interface": "en1",
            "name": "en1",
            "port_number": 1,
            "type": "ethernet"
        },
        {
            "interface": "en2",
            "name": "en2",
            "port_number": 2,
            "type": "ethernet"
        },
        {
            "interface": "utun0",
            "name": "utun0",
            "port_number": 3,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
DELETE /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

Delete a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/eeee4a80-b66d-4865-b9e6-92582712210c'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/eeee4a80-b66d-4865-b9e6-92582712210c HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}

/v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the cloud (always 0)
  • port_number: Port on the cloud
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/91f7220f-e7da-4f00-b5bc-ef63c70b9f5b/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/91f7220f-e7da-4f00-b5bc-ef63c70b9f5b/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}
DELETE /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the cloud (always 0)
  • port_number: Port on the cloud
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/85766740-75a7-40e7-9dc2-31af994af8cd/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/cloud/nodes/85766740-75a7-40e7-9dc2-31af994af8cd/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:40 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/cloud/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a cloud instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the cloud (always 0)
  • port_number: Port on the cloud
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Docker
/v2/compute/projects/{project_id}/docker/nodes
POST /v2/compute/projects/{project_id}/docker/nodes

Create a new Docker container

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
adapters ['integer', 'null'] Number of adapters
aux ['integer', 'null'] Auxiliary TCP port
console ['integer', 'null'] Console TCP port
console_http_path string Path of the web interface
console_http_port integer Internal port in the container for the HTTP server
console_resolution ['string', 'null'] Console resolution for VNC
console_type enum Possible values: telnet, vnc, http, https
container_id string Docker container ID Read only
environment ['string', 'null'] Docker environment variables
image string Docker image name
name string Docker container name
node_id string Node UUID
start_command ['string', 'null'] Docker CMD entry
Output
Name Mandatory Type Description
adapters ['integer', 'null'] number of adapters
aux integer Auxiliary TCP port
console integer Console TCP port
console_http_path string Path of the web interface
console_http_port integer Internal port in the container for the HTTP server
console_resolution string Console resolution for VNC
console_type enum Possible values: telnet, vnc, http, https
container_id string Docker container ID Read only
environment ['string', 'null'] Docker environment
image string Docker image name Read only
name string Docker container name
node_directory string Path to the node working directory Read only
node_id string Node UUID
project_id string Project UUID Read only
start_command ['string', 'null'] Docker CMD entry
status enum Possible values: started, stopped, suspended
/v2/compute/projects/{project_id}/docker/nodes/{node_id}
DELETE /v2/compute/projects/{project_id}/docker/nodes/{node_id}

Delete a Docker container

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
PUT /v2/compute/projects/{project_id}/docker/nodes/{node_id}

Update a Docker instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
adapters ['integer', 'null'] number of adapters
aux integer Auxiliary TCP port
console integer Console TCP port
console_http_path string Path of the web interface
console_http_port integer Internal port in the container for the HTTP server
console_resolution string Console resolution for VNC
console_type enum Possible values: telnet, vnc, http, https
container_id string Docker container ID Read only
environment ['string', 'null'] Docker environment
image string Docker image name Read only
name string Docker container name
node_directory string Path to the node working directory Read only
node_id string Node UUID
project_id string Project UUID Read only
start_command ['string', 'null'] Docker CMD entry
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
adapters ['integer', 'null'] number of adapters
aux integer Auxiliary TCP port
console integer Console TCP port
console_http_path string Path of the web interface
console_http_port integer Internal port in the container for the HTTP server
console_resolution string Console resolution for VNC
console_type enum Possible values: telnet, vnc, http, https
container_id string Docker container ID Read only
environment ['string', 'null'] Docker environment
image string Docker image name Read only
name string Docker container name
node_directory string Path to the node working directory Read only
node_id string Node UUID
project_id string Project UUID Read only
start_command ['string', 'null'] Docker CMD entry
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/8df7b67d-41b8-48b7-a8b3-f25248b9af21' -d '{"console": 5006, "environment": "GNS3=1\nGNS4=0", "name": "test", "start_command": "yes"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/8df7b67d-41b8-48b7-a8b3-f25248b9af21 HTTP/1.1
{
    "console": 5006,
    "environment": "GNS3=1\nGNS4=0",
    "name": "test",
    "start_command": "yes"
}


HTTP/1.1 200
Connection: close
Content-Length: 653
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:42 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}

{
    "adapters": 2,
    "aux": 5005,
    "console": 5006,
    "console_http_path": "/",
    "console_http_port": 80,
    "console_resolution": "1280x1024",
    "console_type": "telnet",
    "container_id": "8bd8153ea8f5",
    "environment": "GNS3=1\nGNS4=0",
    "image": "nginx:latest",
    "name": "test",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/docker/8df7b67d-41b8-48b7-a8b3-f25248b9af21",
    "node_id": "8df7b67d-41b8-48b7-a8b3-f25248b9af21",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "start_command": "yes",
    "status": "stopped"
}
/v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a Docker container

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter where the nio should be added
  • port_number: Port on the adapter
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/798507d5-9725-4bfa-945b-6a22d6c80f0f/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/798507d5-9725-4bfa-945b-6a22d6c80f0f/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:42 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}
DELETE /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a Docker container

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter where the nio should be added
  • port_number: Port on the adapter
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/908a6d69-00ce-403a-9627-a5a874acd69e/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/908a6d69-00ce-403a-9627-a5a874acd69e/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:42 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a Docker container instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Node not started
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/fd243cd9-627a-4aa5-89af-b935882611e5/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/fd243cd9-627a-4aa5-89af-b935882611e5/adapters/0/ports/0/start_capture HTTP/1.1
{
    "capture_file_name": "test.pcap",
    "data_link_type": "DLT_EN10MB"
}


HTTP/1.1 200
Connection: close
Content-Length: 145
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:42 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture

{
    "pcap_file_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/tmp/captures/test.pcap"
}
/v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/stop_capture
POST /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/stop_capture

Stop a packet capture on a Docker container instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to stop a packet capture
  • port_number: Port on the adapter (always 0)
Response status codes
  • 204: Capture stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Container not started
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c58d8241-4b6c-439a-95dd-b259d221df8c/adapters/0/ports/0/stop_capture' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/nodes/c58d8241-4b6c-439a-95dd-b259d221df8c/adapters/0/ports/0/stop_capture HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:42 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/docker/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

Dynamips vm
/v2/compute/projects/{project_id}/dynamips/nodes
POST /v2/compute/projects/{project_id}/dynamips/nodes

Create a new Dynamips VM instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
auto_delete_disks boolean Automatically delete nvram and disk files
aux ['null', 'integer'] Auxiliary console TCP port
chassis string Cisco router chassis model
clock_divisor integer Clock divisor
console integer Console TCP port
console_type enum Possible values: telnet
disk0 integer Disk0 size in MB
disk1 integer Disk1 size in MB
dynamips_id integer Dynamips ID
exec_area integer Exec area value
idlemax integer Idlemax value
idlepc string Idle-PC value
idlesleep integer Idlesleep value
image string Path to the IOS image
image_md5sum ['string', 'null'] Checksum of the IOS image
iomem integer I/O memory percentage
mac_addr string Base MAC address
midplane enum Possible values: std, vxr
mmap boolean MMAP feature
name string Dynamips VM instance name
node_id Node UUID
npe enum Possible values: npe-100, npe-150, npe-175, npe-200, npe-225, npe-300, npe-400, npe-g2
nvram integer Amount of NVRAM in KB
platform string Cisco router platform
power_supplies array Power supplies status
private_config string Path to the IOS private configuration file
private_config_content string Content of IOS private configuration file
ram integer Amount of RAM in MB
sensors array Temperature sensors
slot0 Network module slot 0
slot1 Network module slot 1
slot2 Network module slot 2
slot3 Network module slot 3
slot4 Network module slot 4
slot5 Network module slot 5
slot6 Network module slot 6
sparsemem boolean Sparse memory feature
startup_config string Path to the IOS startup configuration file
startup_config_content string Content of IOS startup configuration file
system_id string System ID
wic0 Network module WIC slot 0
wic1 Network module WIC slot 0
wic2 Network module WIC slot 0
Output
Name Mandatory Type Description
auto_delete_disks boolean Automatically delete nvram and disk files
aux ['integer', 'null'] Auxiliary console TCP port
chassis string Cisco router chassis model
clock_divisor integer Clock divisor
console integer Console TCP port
console_type enum Possible values: telnet
disk0 integer Disk0 size in MB
disk1 integer Disk1 size in MB
dynamips_id integer ID to use with Dynamips
exec_area integer Exec area value
idlemax integer Idlemax value
idlepc string Idle-PC value
idlesleep integer Idlesleep value
image string Path to the IOS image
image_md5sum ['string', 'null'] Checksum of the IOS image
iomem integer I/O memory percentage
mac_addr string Base MAC address
midplane enum Possible values: std, vxr
mmap boolean MMAP feature
name string Dynamips VM instance name
node_directory string Path to the vm working directory
node_id string Node UUID
npe enum Possible values: npe-100, npe-150, npe-175, npe-200, npe-225, npe-300, npe-400, npe-g2
nvram integer Amount of NVRAM in KB
platform string Cisco router platform
power_supplies array Power supplies status
private_config string Path to the IOS private configuration file
private_config_content string Content of IOS private configuration file
project_id string Project UUID
ram integer Amount of RAM in MB
sensors array Temperature sensors
slot0 Network module slot 0
slot1 Network module slot 1
slot2 Network module slot 2
slot3 Network module slot 3
slot4 Network module slot 4
slot5 Network module slot 5
slot6 Network module slot 6
sparsemem boolean Sparse memory feature
startup_config string Path to the IOS startup configuration file
startup_config_content string Content of IOS startup configuration file
status enum Possible values: started, stopped, suspended
system_id string System ID
wic0 Network module WIC slot 0
wic1 Network module WIC slot 0
wic2 Network module WIC slot 0
/v2/compute/projects/{project_id}/dynamips/nodes/{node_id}
GET /v2/compute/projects/{project_id}/dynamips/nodes/{node_id}

Get a Dynamips VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
auto_delete_disks boolean Automatically delete nvram and disk files
aux ['integer', 'null'] Auxiliary console TCP port
chassis string Cisco router chassis model
clock_divisor integer Clock divisor
console integer Console TCP port
console_type enum Possible values: telnet
disk0 integer Disk0 size in MB
disk1 integer Disk1 size in MB
dynamips_id integer ID to use with Dynamips
exec_area integer Exec area value
idlemax integer Idlemax value
idlepc string Idle-PC value
idlesleep integer Idlesleep value
image string Path to the IOS image
image_md5sum ['string', 'null'] Checksum of the IOS image
iomem integer I/O memory percentage
mac_addr string Base MAC address
midplane enum Possible values: std, vxr
mmap boolean MMAP feature
name string Dynamips VM instance name
node_directory string Path to the vm working directory
node_id string Node UUID
npe enum Possible values: npe-100, npe-150, npe-175, npe-200, npe-225, npe-300, npe-400, npe-g2
nvram integer Amount of NVRAM in KB
platform string Cisco router platform
power_supplies array Power supplies status
private_config string Path to the IOS private configuration file
private_config_content string Content of IOS private configuration file
project_id string Project UUID
ram integer Amount of RAM in MB
sensors array Temperature sensors
slot0 Network module slot 0
slot1 Network module slot 1
slot2 Network module slot 2
slot3 Network module slot 3
slot4 Network module slot 4
slot5 Network module slot 5
slot6 Network module slot 6
sparsemem boolean Sparse memory feature
startup_config string Path to the IOS startup configuration file
startup_config_content string Content of IOS startup configuration file
status enum Possible values: started, stopped, suspended
system_id string System ID
wic0 Network module WIC slot 0
wic1 Network module WIC slot 0
wic2 Network module WIC slot 0
PUT /v2/compute/projects/{project_id}/dynamips/nodes/{node_id}

Update a Dynamips VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
auto_delete_disks boolean Automatically delete nvram and disk files
aux integer Auxiliary console TCP port
chassis string Cisco router chassis model
clock_divisor integer Clock divisor
console integer Console TCP port
console_type enum Possible values: telnet
disk0 integer Disk0 size in MB
disk1 integer Disk1 size in MB
dynamips_id integer Dynamips ID
exec_area integer Exec area value
idlemax integer Idlemax value
idlepc string Idle-PC value
idlesleep integer Idlesleep value
image string Path to the IOS image
image_md5sum ['string', 'null'] Checksum of the IOS image
iomem integer I/O memory percentage
mac_addr string Base MAC address
midplane enum Possible values: std, vxr
mmap boolean MMAP feature
name string Dynamips VM instance name
npe enum Possible values: npe-100, npe-150, npe-175, npe-200, npe-225, npe-300, npe-400, npe-g2
nvram integer Amount of NVRAM in KB
platform string Cisco router platform
power_supplies array Power supplies status
private_config string Path to the IOS private configuration file.
private_config_content string Content of IOS private configuration file
ram integer Amount of RAM in MB
sensors array Temperature sensors
slot0 Network module slot 0
slot1 Network module slot 1
slot2 Network module slot 2
slot3 Network module slot 3
slot4 Network module slot 4
slot5 Network module slot 5
slot6 Network module slot 6
sparsemem boolean Sparse memory feature
startup_config string Path to the IOS startup configuration file.
startup_config_content string Content of IOS startup configuration file
system_id string System ID
wic0 Network module WIC slot 0
wic1 Network module WIC slot 0
wic2 Network module WIC slot 0
Output
Name Mandatory Type Description
auto_delete_disks boolean Automatically delete nvram and disk files
aux ['integer', 'null'] Auxiliary console TCP port
chassis string Cisco router chassis model
clock_divisor integer Clock divisor
console integer Console TCP port
console_type enum Possible values: telnet
disk0 integer Disk0 size in MB
disk1 integer Disk1 size in MB
dynamips_id integer ID to use with Dynamips
exec_area integer Exec area value
idlemax integer Idlemax value
idlepc string Idle-PC value
idlesleep integer Idlesleep value
image string Path to the IOS image
image_md5sum ['string', 'null'] Checksum of the IOS image
iomem integer I/O memory percentage
mac_addr string Base MAC address
midplane enum Possible values: std, vxr
mmap boolean MMAP feature
name string Dynamips VM instance name
node_directory string Path to the vm working directory
node_id string Node UUID
npe enum Possible values: npe-100, npe-150, npe-175, npe-200, npe-225, npe-300, npe-400, npe-g2
nvram integer Amount of NVRAM in KB
platform string Cisco router platform
power_supplies array Power supplies status
private_config string Path to the IOS private configuration file
private_config_content string Content of IOS private configuration file
project_id string Project UUID
ram integer Amount of RAM in MB
sensors array Temperature sensors
slot0 Network module slot 0
slot1 Network module slot 1
slot2 Network module slot 2
slot3 Network module slot 3
slot4 Network module slot 4
slot5 Network module slot 5
slot6 Network module slot 6
sparsemem boolean Sparse memory feature
startup_config string Path to the IOS startup configuration file
startup_config_content string Content of IOS startup configuration file
status enum Possible values: started, stopped, suspended
system_id string System ID
wic0 Network module WIC slot 0
wic1 Network module WIC slot 0
wic2 Network module WIC slot 0
DELETE /v2/compute/projects/{project_id}/dynamips/nodes/{node_id}

Delete a Dynamips VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/dynamips/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/dynamips/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a Dynamips VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Ethernet hub
/v2/compute/projects/{project_id}/ethernet_hub/nodes
POST /v2/compute/projects/{project_id}/ethernet_hub/nodes

Create a new Ethernet hub instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Types
EthernetHubPort

Ethernet port

Name Mandatory Type Description
name string Port name
port_number integer Port number
Body
Name Mandatory Type Description
name string Ethernet hub name
node_id Node UUID
ports_mapping array
Output
Name Mandatory Type Description
name string Ethernet hub name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
/v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}
GET /v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}

Get an Ethernet hub instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
name string Ethernet hub name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
PUT /v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}

Update an Ethernet hub instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Types
EthernetHubPort

Ethernet port

Name Mandatory Type Description
name string Port name
port_number integer Port number
Body
Name Mandatory Type Description
name string Ethernet hub name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
name string Ethernet hub name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
DELETE /v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}

Delete an Ethernet hub instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/ethernet_hub/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on an Ethernet hub instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the hub (always 0)
  • port_number: Port on the hub
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Ethernet switch
/v2/compute/projects/{project_id}/ethernet_switch/nodes
POST /v2/compute/projects/{project_id}/ethernet_switch/nodes

Create a new Ethernet switch instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Types
EthernetSwitchPort

Ethernet port

Name Mandatory Type Description
ethertype enum Possible values: null, 0x8100, 0x88A8, 0x9100, 0x9200
name string Port name
port_number integer Port number
type enum Possible values: access, dot1q, qinq
vlan integer VLAN number
Body
Name Mandatory Type Description
name string Ethernet switch name
node_id Node UUID
ports_mapping array
Output
Name Mandatory Type Description
name string Ethernet switch name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
/v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}
GET /v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}

Get an Ethernet switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
name string Ethernet switch name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
PUT /v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}

Update an Ethernet switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Types
EthernetSwitchPort

Ethernet port

Name Mandatory Type Description
ethertype enum Possible values: null, 0x8100, 0x88A8, 0x9100, 0x9200
name string Port name
port_number integer Port number
type enum Possible values: access, dot1q, qinq
vlan integer VLAN number
Body
Name Mandatory Type Description
name string Ethernet switch name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
name string Ethernet switch name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
DELETE /v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}

Delete an Ethernet switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/ethernet_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on an Ethernet switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the switch (always 0)
  • port_number: Port on the switch
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Frame relay switch
/v2/compute/projects/{project_id}/frame_relay_switch/nodes
POST /v2/compute/projects/{project_id}/frame_relay_switch/nodes

Create a new Frame Relay switch instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
mappings object Frame Relay mappings
name string Frame Relay switch name
node_id Node UUID
Output
Name Mandatory Type Description
mappings object Frame Relay mappings
name string Frame Relay switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
/v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}
GET /v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}

Get a Frame Relay switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
mappings object Frame Relay mappings
name string Frame Relay switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
PUT /v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}

Update a Frame Relay switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
mappings object Frame Relay mappings
name string Frame Relay switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
mappings object Frame Relay mappings
name string Frame Relay switch name
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
DELETE /v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}

Delete a Frame Relay switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/frame_relay_switch/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a Frame Relay switch instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the switch (always 0)
  • port_number: Port on the switch
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Iou
/v2/compute/iou/images
GET /v2/compute/iou/images

Retrieve the list of IOU images

Response status codes
  • 200: List of IOU images
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/iou/images'

GET /v2/compute/iou/images HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 149
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/iou/images

[
    {
        "filename": "iou.bin",
        "filesize": 7,
        "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
        "path": "iou.bin"
    }
]
/v2/compute/projects/{project_id}/iou/nodes
POST /v2/compute/projects/{project_id}/iou/nodes

Create a new IOU instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
console ['integer', 'null'] Console TCP port
console_type enum Possible values: telnet, null
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives ['boolean', 'null'] Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_id Node UUID
nvram ['integer', 'null'] Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path to the private-config of IOU
private_config_content ['string', 'null'] Private-config of IOU
ram ['integer', 'null'] Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path to the startup-config of IOU
startup_config_content ['string', 'null'] Startup-config of IOU
use_default_iou_values ['boolean', 'null'] Use default IOU values
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives boolean Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_directory string Path to the node working directory
node_id string IOU VM UUID
nvram integer Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path of the private-config content relative to project directory
private_config_content ['string', 'null'] Private-config of IOU
project_id string Project UUID
ram integer Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path of the startup-config content relative to project directory
startup_config_content ['string', 'null'] Startup-config of IOU
status enum Possible values: started, stopped, suspended
use_default_iou_values ['boolean', 'null'] Use default IOU values
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes' -d '{"name": "PC TEST 1", "node_id": "fc04f13f-c54d-421e-9a05-bb2fcc16857a", "path": "iou.bin", "startup_config_content": "hostname test"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes HTTP/1.1
{
    "name": "PC TEST 1",
    "node_id": "fc04f13f-c54d-421e-9a05-bb2fcc16857a",
    "path": "iou.bin",
    "startup_config_content": "hostname test"
}


HTTP/1.1 201
Connection: close
Content-Length: 792
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:43 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "ethernet_adapters": 2,
    "l1_keepalives": false,
    "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
    "name": "PC TEST 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/iou/fc04f13f-c54d-421e-9a05-bb2fcc16857a",
    "node_id": "fc04f13f-c54d-421e-9a05-bb2fcc16857a",
    "nvram": 128,
    "path": "iou.bin",
    "private_config": null,
    "private_config_content": null,
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 256,
    "serial_adapters": 2,
    "startup_config": "startup-config.cfg",
    "startup_config_content": "echo hello",
    "status": "stopped",
    "use_default_iou_values": true
}
/v2/compute/projects/{project_id}/iou/nodes/{node_id}
GET /v2/compute/projects/{project_id}/iou/nodes/{node_id}

Get an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives boolean Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_directory string Path to the node working directory
node_id string IOU VM UUID
nvram integer Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path of the private-config content relative to project directory
private_config_content ['string', 'null'] Private-config of IOU
project_id string Project UUID
ram integer Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path of the startup-config content relative to project directory
startup_config_content ['string', 'null'] Startup-config of IOU
status enum Possible values: started, stopped, suspended
use_default_iou_values ['boolean', 'null'] Use default IOU values
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/61f62c73-8480-4598-92ec-178b2046a5da'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/61f62c73-8480-4598-92ec-178b2046a5da HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 768
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:43 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "ethernet_adapters": 2,
    "l1_keepalives": false,
    "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
    "name": "PC TEST 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/iou/61f62c73-8480-4598-92ec-178b2046a5da",
    "node_id": "61f62c73-8480-4598-92ec-178b2046a5da",
    "nvram": 128,
    "path": "iou.bin",
    "private_config": null,
    "private_config_content": null,
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 256,
    "serial_adapters": 2,
    "startup_config": null,
    "startup_config_content": null,
    "status": "stopped",
    "use_default_iou_values": true
}
PUT /v2/compute/projects/{project_id}/iou/nodes/{node_id}

Update an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives boolean Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_directory string Path to the node working directory
node_id string IOU VM UUID
nvram integer Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path of the private-config content relative to project directory
private_config_content ['string', 'null'] Private-config of IOU
project_id string Project UUID
ram integer Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path of the startup-config content relative to project directory
startup_config_content ['string', 'null'] Startup-config of IOU
status enum Possible values: started, stopped, suspended
use_default_iou_values ['boolean', 'null'] Use default IOU values
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives boolean Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_directory string Path to the node working directory
node_id string IOU VM UUID
nvram integer Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path of the private-config content relative to project directory
private_config_content ['string', 'null'] Private-config of IOU
project_id string Project UUID
ram integer Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path of the startup-config content relative to project directory
startup_config_content ['string', 'null'] Startup-config of IOU
status enum Possible values: started, stopped, suspended
use_default_iou_values ['boolean', 'null'] Use default IOU values
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8b936d3d-8b50-437f-a205-15ce77fd4240' -d '{"console": 5005, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "startup_config_content": "hostname test", "use_default_iou_values": true}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/8b936d3d-8b50-437f-a205-15ce77fd4240 HTTP/1.1
{
    "console": 5005,
    "ethernet_adapters": 4,
    "iourc_content": "test",
    "l1_keepalives": true,
    "name": "test",
    "nvram": 2048,
    "ram": 512,
    "serial_adapters": 0,
    "startup_config_content": "hostname test",
    "use_default_iou_values": true
}


HTTP/1.1 200
Connection: close
Content-Length: 790
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:44 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}

{
    "command_line": "",
    "console": 5005,
    "console_type": "telnet",
    "ethernet_adapters": 4,
    "l1_keepalives": true,
    "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
    "name": "test",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/iou/8b936d3d-8b50-437f-a205-15ce77fd4240",
    "node_id": "8b936d3d-8b50-437f-a205-15ce77fd4240",
    "nvram": 2048,
    "path": "iou.bin",
    "private_config": null,
    "private_config_content": null,
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 512,
    "serial_adapters": 0,
    "startup_config": "startup-config.cfg",
    "startup_config_content": "hostname test",
    "status": "stopped",
    "use_default_iou_values": true
}
DELETE /v2/compute/projects/{project_id}/iou/nodes/{node_id}

Delete an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/e3bd45e7-0097-4fa6-af79-017a6f20d7c5'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/e3bd45e7-0097-4fa6-af79-017a6f20d7c5 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:44 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}

/v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port where the nio should be added
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/1120208e-153d-4328-bf77-7c87de8b14d2/adapters/1/ports/0/nio' -d '{"ethernet_device": "bridge0", "type": "nio_ethernet"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/1120208e-153d-4328-bf77-7c87de8b14d2/adapters/1/ports/0/nio HTTP/1.1
{
    "ethernet_device": "bridge0",
    "type": "nio_ethernet"
}


HTTP/1.1 201
Connection: close
Content-Length: 64
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:44 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "ethernet_device": "bridge0",
    "type": "nio_ethernet"
}
DELETE /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port from where the nio should be removed
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/9a33b2e9-8964-4ebc-bd59-054de444cf4f/adapters/1/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/9a33b2e9-8964-4ebc-bd59-054de444cf4f/adapters/1/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:44 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on an IOU VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: VM not started
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/9593ac62-eb3a-4f09-b351-90c26ed94b7e/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/9593ac62-eb3a-4f09-b351-90c26ed94b7e/adapters/0/ports/0/start_capture HTTP/1.1
{
    "capture_file_name": "test.pcap",
    "data_link_type": "DLT_EN10MB"
}


HTTP/1.1 200
Connection: close
Content-Length: 145
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture

{
    "pcap_file_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/tmp/captures/test.pcap"
}
/v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/stop_capture
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/stop_capture

Stop a packet capture on an IOU VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to stop a packet capture
  • port_number: Port on the adapter (always 0)
Response status codes
  • 204: Capture stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: VM not started
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/61d07cd7-336f-43c9-8d54-148cf0b7cb49/adapters/0/ports/0/stop_capture' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/61d07cd7-336f-43c9-8d54-148cf0b7cb49/adapters/0/ports/0/stop_capture HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

/v2/compute/projects/{project_id}/iou/nodes/{node_id}/reload
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/reload

Reload an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/18fbfbba-4ccd-43e7-9f8b-5555e224809c/reload' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/18fbfbba-4ccd-43e7-9f8b-5555e224809c/reload HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:44 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/reload

/v2/compute/projects/{project_id}/iou/nodes/{node_id}/start
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/start

Start an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
ethernet_adapters integer How many ethernet adapters are connected to the IOU
iourc_content ['string', 'null'] Content of the iourc file. Ignored if Null
l1_keepalives boolean Always up ethernet interface
md5sum ['string', 'null'] Checksum of iou binary
name string IOU VM name
node_directory string Path to the node working directory
node_id string IOU VM UUID
nvram integer Allocated NVRAM KB
path string Path of iou binary
private_config ['string', 'null'] Path of the private-config content relative to project directory
private_config_content ['string', 'null'] Private-config of IOU
project_id string Project UUID
ram integer Allocated RAM MB
serial_adapters integer How many serial adapters are connected to the IOU
startup_config ['string', 'null'] Path of the startup-config content relative to project directory
startup_config_content ['string', 'null'] Startup-config of IOU
status enum Possible values: started, stopped, suspended
use_default_iou_values ['boolean', 'null'] Use default IOU values
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/22195b00-9af2-48d0-9e98-7f31463c7fd2/start' -d '{"iourc_content": "test"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/22195b00-9af2-48d0-9e98-7f31463c7fd2/start HTTP/1.1
{
    "iourc_content": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 768
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:43 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/start

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "ethernet_adapters": 2,
    "l1_keepalives": false,
    "md5sum": "e573e8f5c93c6c00783f20c7a170aa6c",
    "name": "PC TEST 1",
    "node_directory": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-51/test_json5/project-files/iou/22195b00-9af2-48d0-9e98-7f31463c7fd2",
    "node_id": "22195b00-9af2-48d0-9e98-7f31463c7fd2",
    "nvram": 128,
    "path": "iou.bin",
    "private_config": null,
    "private_config_content": null,
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 256,
    "serial_adapters": 2,
    "startup_config": null,
    "startup_config_content": null,
    "status": "stopped",
    "use_default_iou_values": true
}
/v2/compute/projects/{project_id}/iou/nodes/{node_id}/stop
POST /v2/compute/projects/{project_id}/iou/nodes/{node_id}/stop

Stop an IOU instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/7b8cc3ee-4ed4-425b-85e4-673b79804390/stop' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/nodes/7b8cc3ee-4ed4-425b-85e4-673b79804390/stop HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:43 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/iou/nodes/{node_id}/stop

Nat
/v2/compute/projects/{project_id}/nat/nodes
POST /v2/compute/projects/{project_id}/nat/nodes

Create a new nat instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
name string Nat name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
name string Nat name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes' -d '{"name": "Nat 1"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes HTTP/1.1
{
    "name": "Nat 1"
}


HTTP/1.1 201
Connection: close
Content-Length: 335
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes

{
    "name": "Nat 1",
    "node_id": "681a2b8d-0213-4851-9a40-9ecd68165e8e",
    "ports_mapping": [
        {
            "interface": "virbr0",
            "name": "nat0",
            "port_number": 0,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
/v2/compute/projects/{project_id}/nat/nodes/{node_id}
GET /v2/compute/projects/{project_id}/nat/nodes/{node_id}

Get a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
name string Nat name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/cd149043-78a0-4fda-aa96-e74c3abd90e8'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/cd149043-78a0-4fda-aa96-e74c3abd90e8 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 335
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}

{
    "name": "Nat 1",
    "node_id": "cd149043-78a0-4fda-aa96-e74c3abd90e8",
    "ports_mapping": [
        {
            "interface": "virbr0",
            "name": "nat0",
            "port_number": 0,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
PUT /v2/compute/projects/{project_id}/nat/nodes/{node_id}

Update a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
name string Nat name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Output
Name Mandatory Type Description
name string Nat name
node_id string Node UUID
ports_mapping array
project_id string Project UUID
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/94f5a8c9-1e9e-42b0-bbba-5937d05c9c24' -d '{"name": "test"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/94f5a8c9-1e9e-42b0-bbba-5937d05c9c24 HTTP/1.1
{
    "name": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 334
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:46 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}

{
    "name": "test",
    "node_id": "94f5a8c9-1e9e-42b0-bbba-5937d05c9c24",
    "ports_mapping": [
        {
            "interface": "virbr0",
            "name": "nat0",
            "port_number": 0,
            "type": "ethernet"
        }
    ],
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "status": "started"
}
DELETE /v2/compute/projects/{project_id}/nat/nodes/{node_id}

Delete a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/92b25428-6f34-41f0-b7ed-876cf67528c4'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/92b25428-6f34-41f0-b7ed-876cf67528c4 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}

/v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the nat (always 0)
  • port_number: Port on the nat
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/b952ac47-f2b1-4683-8e67-84b35c017b4e/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/b952ac47-f2b1-4683-8e67-84b35c017b4e/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}
DELETE /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the nat (always 0)
  • port_number: Port on the nat
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/d468a9d2-40ce-4bda-92cf-0861eed15000/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/nat/nodes/d468a9d2-40ce-4bda-92cf-0861eed15000/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:45 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/nat/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a nat instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter on the nat (always 0)
  • port_number: Port on the nat
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Network
/v2/compute/network/interfaces
GET /v2/compute/network/interfaces

List all the network interfaces available on the server

Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/network/interfaces'

GET /v2/compute/network/interfaces HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 5665
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:46 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/network/interfaces

[
    {
        "id": "bridge0",
        "ip_address": "",
        "mac_address": "d2:00:1b:c0:17:80",
        "name": "bridge0",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "en0",
        "ip_address": "",
        "mac_address": "3c:07:54:78:07:cc",
        "name": "en0",
        "netmask": "",
        "special": false,
        "type": "ethernet"
    },
    {
        "id": "en1",
        "ip_address": "192.168.84.156",
        "mac_address": "68:a8:6d:4a:c3:16",
        "name": "en1",
        "netmask": "255.255.255.0",
        "special": false,
        "type": "ethernet"
    },
    {
        "id": "en2",
        "ip_address": "",
        "mac_address": "d2:00:1b:c0:17:80",
        "name": "en2",
        "netmask": "",
        "special": false,
        "type": "ethernet"
    },
    {
        "id": "fw0",
        "ip_address": "",
        "mac_address": "3c:07:54:ff:fe:bc:01:78",
        "name": "fw0",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "lo0",
        "ip_address": "127.0.0.1",
        "mac_address": "",
        "name": "lo0",
        "netmask": "255.0.0.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "p2p0",
        "ip_address": "",
        "mac_address": "0a:a8:6d:4a:c3:16",
        "name": "p2p0",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "utun0",
        "ip_address": "",
        "mac_address": "",
        "name": "utun0",
        "netmask": "",
        "special": false,
        "type": "ethernet"
    },
    {
        "id": "vboxnet0",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:00",
        "name": "vboxnet0",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet1",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:01",
        "name": "vboxnet1",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet2",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:02",
        "name": "vboxnet2",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet3",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:03",
        "name": "vboxnet3",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet4",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:04",
        "name": "vboxnet4",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet5",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:05",
        "name": "vboxnet5",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet6",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:06",
        "name": "vboxnet6",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vboxnet7",
        "ip_address": "",
        "mac_address": "0a:00:27:00:00:07",
        "name": "vboxnet7",
        "netmask": "",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet1",
        "ip_address": "172.16.16.1",
        "mac_address": "00:50:56:c0:00:01",
        "name": "vmnet1",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet10",
        "ip_address": "172.16.7.1",
        "mac_address": "00:50:56:c0:00:0a",
        "name": "vmnet10",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet2",
        "ip_address": "172.16.0.1",
        "mac_address": "00:50:56:c0:00:02",
        "name": "vmnet2",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet3",
        "ip_address": "172.16.1.1",
        "mac_address": "00:50:56:c0:00:03",
        "name": "vmnet3",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet4",
        "ip_address": "172.16.2.1",
        "mac_address": "00:50:56:c0:00:04",
        "name": "vmnet4",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet5",
        "ip_address": "172.16.3.1",
        "mac_address": "00:50:56:c0:00:05",
        "name": "vmnet5",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet6",
        "ip_address": "172.16.4.1",
        "mac_address": "00:50:56:c0:00:06",
        "name": "vmnet6",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet7",
        "ip_address": "172.16.5.1",
        "mac_address": "00:50:56:c0:00:07",
        "name": "vmnet7",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet8",
        "ip_address": "192.168.229.1",
        "mac_address": "00:50:56:c0:00:08",
        "name": "vmnet8",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    },
    {
        "id": "vmnet9",
        "ip_address": "172.16.6.1",
        "mac_address": "00:50:56:c0:00:09",
        "name": "vmnet9",
        "netmask": "255.255.255.0",
        "special": true,
        "type": "ethernet"
    }
]
/v2/compute/projects/{project_id}/ports/udp
POST /v2/compute/projects/{project_id}/ports/udp

Allocate an UDP port on the server

Parameters
  • project_id: Project UUID
Response status codes
  • 201: UDP port allocated
  • 404: The project doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/ports/udp' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/ports/udp HTTP/1.1
{}


HTTP/1.1 201
Connection: close
Content-Length: 25
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:46 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/ports/udp

{
    "udp_port": 10000
}
Project
/v2/compute/projects
GET /v2/compute/projects

List all projects opened on the server

Response status codes
  • 200: Project list
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects'

GET /v2/compute/projects HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 198
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:47 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects

[
    {
        "name": "test",
        "project_id": "51010203-0405-0607-0809-0a0b0c0d0e0f"
    },
    {
        "name": "test",
        "project_id": "52010203-0405-0607-0809-0a0b0c0d0e0b"
    }
]
POST /v2/compute/projects

Create a new project on the server

Response status codes
  • 201: Project created
  • 403: Forbidden to create a project
  • 409: Project already created
Input
Name Mandatory Type Description
auto_close boolean Project auto close
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id ['string', 'null'] Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects' -d '{"name": "test", "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"}'

POST /v2/compute/projects HTTP/1.1
{
    "name": "test",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"
}


HTTP/1.1 201
Connection: close
Content-Length: 80
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:46 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects

{
    "name": "test",
    "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f"
}
/v2/compute/projects/{project_id}
GET /v2/compute/projects/{project_id}

Get project information

Parameters
  • project_id: Project UUID
Response status codes
  • 200: Success
  • 404: The project doesn’t exist
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/40010203-0405-0607-0809-0a0b0c0d0e02'

GET /v2/compute/projects/40010203-0405-0607-0809-0a0b0c0d0e02 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 80
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:46 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}

{
    "name": "test",
    "project_id": "40010203-0405-0607-0809-0a0b0c0d0e02"
}
DELETE /v2/compute/projects/{project_id}

Delete a project from disk

Parameters
  • project_id: Project UUID
Response status codes
  • 204: Changes have been written on disk
  • 404: The project doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:47 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}

/v2/compute/projects/{project_id}/close
POST /v2/compute/projects/{project_id}/close

Close a project

Parameters
  • project_id: Project UUID
Response status codes
  • 204: Project closed
  • 404: The project doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:47 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/close

/v2/compute/projects/{project_id}/import
POST /v2/compute/projects/{project_id}/import

Import a project from a portable archive

Parameters
  • project_id: Project UUID
Response status codes
  • 200: Project imported
  • 403: Forbidden to import project
Output
Name Mandatory Type Description
auto_close boolean Project auto close when client cut off the notifications feed
auto_open boolean Project open when GNS3 start
auto_start boolean Project start when opened
filename ['string', 'null'] Project filename
name ['string', 'null'] Project name
path ['string', 'null'] Project directory
project_id string Project UUID
scene_height integer Height of the drawing area
scene_width integer Width of the drawing area
status enum Possible values: opened, closed
Qemu
/v2/compute/projects/{project_id}/qemu/nodes
POST /v2/compute/projects/{project_id}/qemu/nodes

Create a new Qemu VM instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown ['boolean', 'null'] ACPI shutdown support
adapter_type ['string', 'null'] QEMU adapter type
adapters ['integer', 'null'] Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
console ['integer', 'null'] Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling ['integer', 'null'] Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line ['string', 'null'] QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking ['boolean', 'null'] Use QEMU legagy networking commands (-net syntax)
linked_clone boolean Whether the VM is a linked clone or not
mac_address ['string', 'null'] QEMU MAC address
name string QEMU VM instance name
node_id Node UUID
options ['string', 'null'] Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb, null
process_priority enum Possible values: realtime, very high, high, normal, low, very low, null
qemu_path ['string', 'null'] Path to QEMU
ram ['integer', 'null'] Amount of RAM in MB
usage string How to use the qemu VM
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown support
adapter_type string QEMU adapter type
adapters integer Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling integer Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line string QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking boolean Use QEMU legagy networking commands (-net syntax)
mac_address string QEMU MAC address
name string QEMU VM instance name
node_directory string Path to the VM working directory
node_id string Node UUID
options string Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb
process_priority enum Possible values: realtime, very high, high, normal, low, very low
project_id string Project UUID
qemu_path string Path to QEMU
ram integer Amount of RAM in MB
status enum Possible values: started, stopped, suspended
usage string How to use the QEMU VM
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes' -d '{"hda_disk_image": "linux\u8f7d.img", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64", "ram": 1024}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes HTTP/1.1
{
    "hda_disk_image": "linux\u8f7d.img",
    "name": "PC TEST 1",
    "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64",
    "ram": 1024
}


HTTP/1.1 201
Connection: close
Content-Length: 1514
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:48 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes

{
    "acpi_shutdown": false,
    "adapter_type": "e1000",
    "adapters": 1,
    "bios_image": "",
    "bios_image_md5sum": null,
    "boot_priority": "c",
    "cdrom_image": "",
    "cdrom_image_md5sum": null,
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "cpu_throttling": 0,
    "cpus": 1,
    "hda_disk_image": "linux\u8f7d.img",
    "hda_disk_image_md5sum": "c4ca4238a0b923820dcc509a6f75849b",
    "hda_disk_interface": "ide",
    "hdb_disk_image": "",
    "hdb_disk_image_md5sum": null,
    "hdb_disk_interface": "ide",
    "hdc_disk_image": "",
    "hdc_disk_image_md5sum": null,
    "hdc_disk_interface": "ide",
    "hdd_disk_image": "",
    "hdd_disk_image_md5sum": null,
    "hdd_disk_interface": "ide",
    "initrd": "",
    "initrd_md5sum": null,
    "kernel_command_line": "",
    "kernel_image": "",
    "kernel_image_md5sum": null,
    "legacy_networking": false,
    "mac_address": "00:dd:80:71:32:00",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/e49b7703-f596-4e60-9e30-f5bc6f917132",
    "node_id": "e49b7703-f596-4e60-9e30-f5bc6f917132",
    "options": "",
    "platform": "x86_64",
    "process_priority": "low",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64",
    "ram": 1024,
    "status": "stopped",
    "usage": ""
}
/v2/compute/projects/{project_id}/qemu/nodes/{node_id}
GET /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

Get a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown support
adapter_type string QEMU adapter type
adapters integer Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling integer Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line string QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking boolean Use QEMU legagy networking commands (-net syntax)
mac_address string QEMU MAC address
name string QEMU VM instance name
node_directory string Path to the VM working directory
node_id string Node UUID
options string Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb
process_priority enum Possible values: realtime, very high, high, normal, low, very low
project_id string Project UUID
qemu_path string Path to QEMU
ram integer Amount of RAM in MB
status enum Possible values: started, stopped, suspended
usage string How to use the QEMU VM
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/6bdb5099-446a-43c4-9734-a2037011df6b'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/6bdb5099-446a-43c4-9734-a2037011df6b HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 1468
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:48 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

{
    "acpi_shutdown": false,
    "adapter_type": "e1000",
    "adapters": 1,
    "bios_image": "",
    "bios_image_md5sum": null,
    "boot_priority": "c",
    "cdrom_image": "",
    "cdrom_image_md5sum": null,
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "cpu_throttling": 0,
    "cpus": 1,
    "hda_disk_image": "",
    "hda_disk_image_md5sum": null,
    "hda_disk_interface": "ide",
    "hdb_disk_image": "",
    "hdb_disk_image_md5sum": null,
    "hdb_disk_interface": "ide",
    "hdc_disk_image": "",
    "hdc_disk_image_md5sum": null,
    "hdc_disk_interface": "ide",
    "hdd_disk_image": "",
    "hdd_disk_image_md5sum": null,
    "hdd_disk_interface": "ide",
    "initrd": "",
    "initrd_md5sum": null,
    "kernel_command_line": "",
    "kernel_image": "",
    "kernel_image_md5sum": null,
    "legacy_networking": false,
    "mac_address": "00:dd:80:df:6b:00",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/6bdb5099-446a-43c4-9734-a2037011df6b",
    "node_id": "6bdb5099-446a-43c4-9734-a2037011df6b",
    "options": "",
    "platform": "x86_64",
    "process_priority": "low",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64",
    "ram": 256,
    "status": "stopped",
    "usage": ""
}
PUT /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

Update a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown ['boolean', 'null'] ACPI shutdown support
adapter_type ['string', 'null'] QEMU adapter type
adapters ['integer', 'null'] Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
console ['integer', 'null'] Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling ['integer', 'null'] Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line ['string', 'null'] QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking ['boolean', 'null'] Use QEMU legagy networking commands (-net syntax)
linked_clone boolean Whether the VM is a linked clone or not
mac_address ['string', 'null'] QEMU MAC address
name ['string', 'null'] QEMU VM instance name
options ['string', 'null'] Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb, null
process_priority enum Possible values: realtime, very high, high, normal, low, very low, null
qemu_path ['string', 'null'] Path to QEMU
ram ['integer', 'null'] Amount of RAM in MB
usage string How to use the QEMU VM
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown support
adapter_type string QEMU adapter type
adapters integer Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling integer Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line string QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking boolean Use QEMU legagy networking commands (-net syntax)
mac_address string QEMU MAC address
name string QEMU VM instance name
node_directory string Path to the VM working directory
node_id string Node UUID
options string Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb
process_priority enum Possible values: realtime, very high, high, normal, low, very low
project_id string Project UUID
qemu_path string Path to QEMU
ram integer Amount of RAM in MB
status enum Possible values: started, stopped, suspended
usage string How to use the QEMU VM
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/a88ca6cb-fea5-40c2-ada6-73f056e94eb7' -d '{"console": 5006, "hdb_disk_image": "linux\u8f7d.img", "name": "test", "ram": 1024}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/a88ca6cb-fea5-40c2-ada6-73f056e94eb7 HTTP/1.1
{
    "console": 5006,
    "hdb_disk_image": "linux\u8f7d.img",
    "name": "test",
    "ram": 1024
}


HTTP/1.1 200
Connection: close
Content-Length: 1509
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:49 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

{
    "acpi_shutdown": false,
    "adapter_type": "e1000",
    "adapters": 1,
    "bios_image": "",
    "bios_image_md5sum": null,
    "boot_priority": "c",
    "cdrom_image": "",
    "cdrom_image_md5sum": null,
    "command_line": "",
    "console": 5006,
    "console_type": "telnet",
    "cpu_throttling": 0,
    "cpus": 1,
    "hda_disk_image": "",
    "hda_disk_image_md5sum": null,
    "hda_disk_interface": "ide",
    "hdb_disk_image": "linux\u8f7d.img",
    "hdb_disk_image_md5sum": "c4ca4238a0b923820dcc509a6f75849b",
    "hdb_disk_interface": "ide",
    "hdc_disk_image": "",
    "hdc_disk_image_md5sum": null,
    "hdc_disk_interface": "ide",
    "hdd_disk_image": "",
    "hdd_disk_image_md5sum": null,
    "hdd_disk_interface": "ide",
    "initrd": "",
    "initrd_md5sum": null,
    "kernel_command_line": "",
    "kernel_image": "",
    "kernel_image_md5sum": null,
    "legacy_networking": false,
    "mac_address": "00:dd:80:4e:b7:00",
    "name": "test",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/a88ca6cb-fea5-40c2-ada6-73f056e94eb7",
    "node_id": "a88ca6cb-fea5-40c2-ada6-73f056e94eb7",
    "options": "",
    "platform": "x86_64",
    "process_priority": "low",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64",
    "ram": 1024,
    "status": "stopped",
    "usage": ""
}
DELETE /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

Delete a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/80371207-d146-4f75-ac1f-efa58b2fbc0a'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/80371207-d146-4f75-ac1f-efa58b2fbc0a HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:49 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}

/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port on the adapter (always 0)
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/a6011c49-adf8-4e1e-8731-4c963315f662/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_ethernet"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/a6011c49-adf8-4e1e-8731-4c963315f662/adapters/1/ports/0/nio HTTP/1.1
{
    "ethernet_device": "eth0",
    "type": "nio_ethernet"
}


HTTP/1.1 409
Connection: close
Content-Length: 81
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:50 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "message": "NIO of type nio_ethernet is not supported",
    "status": 409
}
DELETE /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port on the adapter (always 0)
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/13ae9cf1-8289-4d3f-b97b-cc677f9dc8c8/adapters/1/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/13ae9cf1-8289-4d3f-b97b-cc677f9dc8c8/adapters/1/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:50 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter (always 0)
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/reload
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/reload

Reload a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/64933f6c-e8cb-480c-81a2-075de93d09d9/reload' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/64933f6c-e8cb-480c-81a2-075de93d09d9/reload HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:49 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/reload

/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/resume
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/resume

Resume a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance resumed
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/84a63d18-61c2-4a77-97eb-4d54b19b8825/resume' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/84a63d18-61c2-4a77-97eb-4d54b19b8825/resume HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:49 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/resume

/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/start
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/start

Start a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown support
adapter_type string QEMU adapter type
adapters integer Number of adapters
bios_image string QEMU bios image path
bios_image_md5sum ['string', 'null'] QEMU bios image checksum
boot_priority enum Possible values: c, d, n, cn, cd
cdrom_image string QEMU cdrom image path
cdrom_image_md5sum ['string', 'null'] QEMU cdrom image checksum
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet, vnc
cpu_throttling integer Percentage of CPU allowed for QEMU
cpus ['integer', 'null'] Number of vCPUs
hda_disk_image string QEMU hda disk image path
hda_disk_image_md5sum ['string', 'null'] QEMU hda disk image checksum
hda_disk_interface string QEMU hda interface
hdb_disk_image string QEMU hdb disk image path
hdb_disk_image_md5sum ['string', 'null'] QEMU hdb disk image checksum
hdb_disk_interface string QEMU hdb interface
hdc_disk_image string QEMU hdc disk image path
hdc_disk_image_md5sum ['string', 'null'] QEMU hdc disk image checksum
hdc_disk_interface string QEMU hdc interface
hdd_disk_image string QEMU hdd disk image path
hdd_disk_image_md5sum ['string', 'null'] QEMU hdd disk image checksum
hdd_disk_interface string QEMU hdd interface
initrd string QEMU initrd path
initrd_md5sum ['string', 'null'] QEMU initrd path
kernel_command_line string QEMU kernel command line
kernel_image string QEMU kernel image path
kernel_image_md5sum ['string', 'null'] QEMU kernel image checksum
legacy_networking boolean Use QEMU legagy networking commands (-net syntax)
mac_address string QEMU MAC address
name string QEMU VM instance name
node_directory string Path to the VM working directory
node_id string Node UUID
options string Additional QEMU options
platform enum Possible values: aarch64, alpha, arm, cris, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, or32, ppc, ppc64, ppcemb, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb
process_priority enum Possible values: realtime, very high, high, normal, low, very low
project_id string Project UUID
qemu_path string Path to QEMU
ram integer Amount of RAM in MB
status enum Possible values: started, stopped, suspended
usage string How to use the QEMU VM
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/0ec7c554-3bc6-42e2-9284-11b6b1e51db1/start' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/0ec7c554-3bc6-42e2-9284-11b6b1e51db1/start HTTP/1.1
{}


HTTP/1.1 200
Connection: close
Content-Length: 1468
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:48 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/start

{
    "acpi_shutdown": false,
    "adapter_type": "e1000",
    "adapters": 1,
    "bios_image": "",
    "bios_image_md5sum": null,
    "boot_priority": "c",
    "cdrom_image": "",
    "cdrom_image_md5sum": null,
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "cpu_throttling": 0,
    "cpus": 1,
    "hda_disk_image": "",
    "hda_disk_image_md5sum": null,
    "hda_disk_interface": "ide",
    "hdb_disk_image": "",
    "hdb_disk_image_md5sum": null,
    "hdb_disk_interface": "ide",
    "hdc_disk_image": "",
    "hdc_disk_image_md5sum": null,
    "hdc_disk_interface": "ide",
    "hdd_disk_image": "",
    "hdd_disk_image_md5sum": null,
    "hdd_disk_interface": "ide",
    "initrd": "",
    "initrd_md5sum": null,
    "kernel_command_line": "",
    "kernel_image": "",
    "kernel_image_md5sum": null,
    "legacy_networking": false,
    "mac_address": "00:dd:80:1d:b1:00",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/0ec7c554-3bc6-42e2-9284-11b6b1e51db1",
    "node_id": "0ec7c554-3bc6-42e2-9284-11b6b1e51db1",
    "options": "",
    "platform": "x86_64",
    "process_priority": "low",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp9s3gyopf/qemu-system-x86_64",
    "ram": 256,
    "status": "stopped",
    "usage": ""
}
/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/stop
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/stop

Stop a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/0c174db5-a2c4-464f-98e7-153b83532e35/stop' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/0c174db5-a2c4-464f-98e7-153b83532e35/stop HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:48 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/stop

/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/suspend
POST /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/suspend

Suspend a Qemu VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance suspended
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/3668274c-d74e-4f59-ab74-ab52442ccf61/suspend' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/nodes/3668274c-d74e-4f59-ab74-ab52442ccf61/suspend HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:49 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/qemu/nodes/{node_id}/suspend

/v2/compute/qemu/binaries
GET /v2/compute/qemu/binaries

Get a list of available Qemu binaries

Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
archs array Architectures to filter binaries with
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/qemu/binaries' -d '{"archs": ["i386"]}'

GET /v2/compute/qemu/binaries HTTP/1.1
{
    "archs": [
        "i386"
    ]
}


HTTP/1.1 200
Connection: close
Content-Length: 212
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:50 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/qemu/binaries

[
    {
        "path": "/tmp/x86_64",
        "version": "2.2.0"
    },
    {
        "path": "/tmp/alpha",
        "version": "2.1.0"
    },
    {
        "path": "/tmp/i386",
        "version": "2.1.0"
    }
]
/v2/compute/qemu/capabilities
GET /v2/compute/qemu/capabilities

Get a list of Qemu capabilities on this server

Output
Name Mandatory Type Description
kvm array Architectures that KVM is enabled for
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/qemu/capabilities'

GET /v2/compute/qemu/capabilities HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 39
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:51 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/qemu/capabilities

{
    "kvm": [
        "x86_64"
    ]
}
/v2/compute/qemu/img
POST /v2/compute/qemu/img

Create a Qemu image

Response status codes
  • 201: Image created
Input
Name Mandatory Type Description
adapter_type enum Possible values: ide, lsilogic, buslogic, legacyESX
cluster_size integer
format enum Possible values: qcow2, qcow, vpc, vdi, vmdk, raw
lazy_refcounts enum Possible values: on, off
path string Absolute or relative path of the image
preallocation enum Possible values: off, metadata, falloc, full
qemu_img string Path to the qemu-img binary
refcount_bits integer
size integer Image size in Megabytes
static enum Possible values: on, off
subformat enum Possible values: dynamic, fixed, streamOptimized, twoGbMaxExtentSparse, twoGbMaxExtentFlat, monolithicSparse, monolithicFlat
zeroed_grain enum Possible values: on, off
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/qemu/img' -d '{"cluster_size": 64, "format": "qcow2", "lazy_refcounts": "off", "path": "/tmp/hda.qcow2", "preallocation": "metadata", "qemu_img": "/tmp/qemu-img", "refcount_bits": 12, "size": 100}'

POST /v2/compute/qemu/img HTTP/1.1
{
    "cluster_size": 64,
    "format": "qcow2",
    "lazy_refcounts": "off",
    "path": "/tmp/hda.qcow2",
    "preallocation": "metadata",
    "qemu_img": "/tmp/qemu-img",
    "refcount_bits": 12,
    "size": 100
}


HTTP/1.1 201
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:51 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/qemu/img

/v2/compute/qemu/img-binaries
GET /v2/compute/qemu/img-binaries

Get a list of available Qemu-img binaries

Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Server
/v2/compute/version
GET /v2/compute/version

Retrieve the server version number

Output
Name Mandatory Type Description
local boolean Whether this is a local server or not
version string Version number
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/version'

GET /v2/compute/version HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 50
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:51 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/version

{
    "local": true,
    "version": "2.0.0dev11"
}
Virtualbox
/v2/compute/projects/{project_id}/virtualbox/nodes
POST /v2/compute/projects/{project_id}/virtualbox/nodes

Create a new VirtualBox VM instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VirtualBox adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VirtualBox VM instance name
node_id Node UUID
ram integer Amount of RAM
use_any_adapter boolean Allow GNS3 to use any VirtualBox adapter
vmname string VirtualBox VM name (in VirtualBox itself)
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VirtualBox adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VirtualBox VM instance name
node_directory ['string', 'null'] Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
ram integer Amount of RAM
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VirtualBox adapter
vmname string VirtualBox VM name (in VirtualBox itself)
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes HTTP/1.1
{
    "linked_clone": false,
    "name": "VM1",
    "vmname": "VM1"
}


HTTP/1.1 201
Connection: close
Content-Length: 459
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:52 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes

{
    "acpi_shutdown": false,
    "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
    "adapters": 0,
    "console": 5004,
    "console_type": "telnet",
    "headless": false,
    "linked_clone": false,
    "name": "VM1",
    "node_directory": null,
    "node_id": "4c74d21f-6af2-4fde-82a6-5e15c3037dd8",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 0,
    "status": "stopped",
    "use_any_adapter": false,
    "vmname": "VM1"
}
/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}
GET /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}

Get a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VirtualBox adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VirtualBox VM instance name
node_directory ['string', 'null'] Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
ram integer Amount of RAM
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VirtualBox adapter
vmname string VirtualBox VM name (in VirtualBox itself)
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/29d6dc03-42e5-4c3b-9892-4e69a3dbac7c'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/29d6dc03-42e5-4c3b-9892-4e69a3dbac7c HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 465
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:52 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}

{
    "acpi_shutdown": false,
    "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
    "adapters": 0,
    "console": 5004,
    "console_type": "telnet",
    "headless": false,
    "linked_clone": false,
    "name": "VMTEST",
    "node_directory": null,
    "node_id": "29d6dc03-42e5-4c3b-9892-4e69a3dbac7c",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 0,
    "status": "stopped",
    "use_any_adapter": false,
    "vmname": "VMTEST"
}
PUT /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}

Update a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VirtualBox adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VirtualBox VM instance name
node_directory ['string', 'null'] Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
ram integer Amount of RAM
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VirtualBox adapter
vmname string VirtualBox VM name (in VirtualBox itself)
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VirtualBox adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VirtualBox VM instance name
node_directory ['string', 'null'] Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
ram integer Amount of RAM
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VirtualBox adapter
vmname string VirtualBox VM name (in VirtualBox itself)
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/26188067-49b1-40f6-8b2c-11ed74c7ac18' -d '{"console": 5005, "name": "test"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/26188067-49b1-40f6-8b2c-11ed74c7ac18 HTTP/1.1
{
    "console": 5005,
    "name": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 463
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}

{
    "acpi_shutdown": false,
    "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
    "adapters": 0,
    "console": 5005,
    "console_type": "telnet",
    "headless": false,
    "linked_clone": false,
    "name": "test",
    "node_directory": null,
    "node_id": "26188067-49b1-40f6-8b2c-11ed74c7ac18",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "ram": 0,
    "status": "stopped",
    "use_any_adapter": false,
    "vmname": "VMTEST"
}
DELETE /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}

Delete a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter where the nio should be added
  • port_number: Port on the adapter (always 0)
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/950553f4-1f4c-4d47-ab35-b00817c9dae9/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/950553f4-1f4c-4d47-ab35-b00817c9dae9/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}
DELETE /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter from where the nio should be removed
  • port_number: Port on the adapter (always 0)
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/62493495-be49-416b-8761-4d9ed3709a80/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/62493495-be49-416b-8761-4d9ed3709a80/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter (always 0)
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/reload
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/reload

Reload a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/a89cbf17-8504-4590-a4db-214adf91b473/reload' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/a89cbf17-8504-4590-a4db-214adf91b473/reload HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/reload

/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/resume
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/resume

Resume a suspended VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance resumed
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/b11da8d7-abb5-401e-a53a-3ce767c1a1bb/resume' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/b11da8d7-abb5-401e-a53a-3ce767c1a1bb/resume HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/resume

/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/start
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/start

Start a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/0e7a38fe-7626-4d75-a545-8b0764472eec/start' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/0e7a38fe-7626-4d75-a545-8b0764472eec/start HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:52 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/start

/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/stop
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/stop

Stop a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/23d775e8-6206-4f15-9bad-3cc5c75dd219/stop' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/23d775e8-6206-4f15-9bad-3cc5c75dd219/stop HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:52 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/stop

/v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/suspend
POST /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/suspend

Suspend a VirtualBox VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance suspended
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/b3e67522-dd20-4bde-b2e8-43e815d65b6d/suspend' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/nodes/b3e67522-dd20-4bde-b2e8-43e815d65b6d/suspend HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:52 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/virtualbox/nodes/{node_id}/suspend

Vmware
/v2/compute/projects/{project_id}/vmware/nodes
POST /v2/compute/projects/{project_id}/vmware/nodes

Create a new VMware VM instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VMware adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VMware VM instance name
node_id string Node UUID
use_any_adapter boolean Allow GNS3 to use any VMware adapter
vmx_path string Path to the vmx file
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VMware adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VMware VM instance name
node_directory ['string', 'null'] Path to the node working directory
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VMware adapter
vmx_path string Path to the vmx file
/v2/compute/projects/{project_id}/vmware/nodes/{node_id}
GET /v2/compute/projects/{project_id}/vmware/nodes/{node_id}

Get a VMware VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VMware adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VMware VM instance name
node_directory ['string', 'null'] Path to the node working directory
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VMware adapter
vmx_path string Path to the vmx file
PUT /v2/compute/projects/{project_id}/vmware/nodes/{node_id}

Update a VMware VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VMware adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VMware VM instance name
node_directory ['string', 'null'] Path to the node working directory
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VMware adapter
vmx_path string Path to the vmx file
Output
Name Mandatory Type Description
acpi_shutdown boolean ACPI shutdown
adapter_type string VMware adapter type
adapters integer Number of adapters
console integer Console TCP port
console_type enum Possible values: telnet
headless boolean Headless mode
linked_clone boolean Whether the VM is a linked clone or not
name string VMware VM instance name
node_directory ['string', 'null'] Path to the node working directory
node_id string Node UUID
project_id string Project UUID
status enum Possible values: started, stopped, suspended
use_any_adapter boolean Allow GNS3 to use any VMware adapter
vmx_path string Path to the vmx file
DELETE /v2/compute/projects/{project_id}/vmware/nodes/{node_id}

Delete a VMware VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
/v2/compute/projects/{project_id}/vmware/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/vmware/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a VMware VM instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter (always 0)
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
Vpcs
/v2/compute/projects/{project_id}/vpcs/nodes
POST /v2/compute/projects/{project_id}/vpcs/nodes

Create a new VPCS instance

Parameters
  • project_id: Project UUID
Response status codes
  • 201: Instance created
  • 400: Invalid request
  • 409: Conflict
Input
Name Mandatory Type Description
console ['integer', 'null'] Console TCP port
console_type enum Possible values: telnet
name string VPCS VM name
node_id Node UUID
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory (IGNORED)
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
name string VPCS VM name
node_directory string Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes' -d '{"name": "PC TEST 1"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes HTTP/1.1
{
    "name": "PC TEST 1"
}


HTTP/1.1 201
Connection: close
Content-Length: 489
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/54184038-3552-4386-8a8d-7c13080fae06",
    "node_id": "54184038-3552-4386-8a8d-7c13080fae06",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "startup_script": null,
    "startup_script_path": null,
    "status": "stopped"
}
/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}
GET /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

Get a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Success
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
name string VPCS VM name
node_directory string Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X GET 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/8adc20e6-687b-4246-a470-be4a171ebd98'

GET /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/8adc20e6-687b-4246-a470-be4a171ebd98 HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 489
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:53 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/8adc20e6-687b-4246-a470-be4a171ebd98",
    "node_id": "8adc20e6-687b-4246-a470-be4a171ebd98",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "startup_script": null,
    "startup_script_path": null,
    "status": "stopped"
}
PUT /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

Update a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 200: Instance updated
  • 400: Invalid request
  • 404: Instance doesn’t exist
  • 409: Conflict
Input
Name Mandatory Type Description
console ['integer', 'null'] Console TCP port
console_type enum Possible values: telnet
name ['string', 'null'] VPCS VM name
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory (IGNORED)
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
name string VPCS VM name
node_directory string Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X PUT 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/550cc2b9-d124-467d-9407-3754c6bc287d' -d '{"console": 5006, "name": "test"}'

PUT /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/550cc2b9-d124-467d-9407-3754c6bc287d HTTP/1.1
{
    "console": 5006,
    "name": "test"
}


HTTP/1.1 200
Connection: close
Content-Length: 484
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:55 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

{
    "command_line": "",
    "console": 5006,
    "console_type": "telnet",
    "name": "test",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/550cc2b9-d124-467d-9407-3754c6bc287d",
    "node_id": "550cc2b9-d124-467d-9407-3754c6bc287d",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "startup_script": null,
    "startup_script_path": null,
    "status": "stopped"
}
DELETE /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

Delete a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/07f5aea7-ca70-4efb-b103-1033630ca889'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/07f5aea7-ca70-4efb-b103-1033630ca889 HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:55 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}

/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio
POST /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Add a NIO to a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port where the nio should be added
Response status codes
  • 201: NIO created
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/ed43313f-0b29-44a2-9183-a3703fe1aad0/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/ed43313f-0b29-44a2-9183-a3703fe1aad0/adapters/0/ports/0/nio HTTP/1.1
{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}


HTTP/1.1 201
Connection: close
Content-Length: 89
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:54 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

{
    "lport": 4242,
    "rhost": "127.0.0.1",
    "rport": 4343,
    "type": "nio_udp"
}
DELETE /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/nio

Remove a NIO from a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Network adapter where the nio is located
  • port_number: Port from where the nio should be removed
Response status codes
  • 204: NIO deleted
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X DELETE 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/f663baf3-b84f-4ad0-a8b8-b8a43ebd8a2d/adapters/0/ports/0/nio'

DELETE /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/f663baf3-b84f-4ad0-a8b8-b8a43ebd8a2d/adapters/0/ports/0/nio HTTP/1.1



HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:54 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture
POST /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/adapters/{adapter_number:d+}/ports/{port_number:d+}/start_capture

Start a packet capture on a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
  • adapter_number: Adapter to start a packet capture
  • port_number: Port on the adapter
Response status codes
  • 200: Capture started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Input
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type enum Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL
/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/reload
POST /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/reload

Reload a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance reloaded
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/cfdc8b6c-4254-4f9c-9095-7886c4b8894a/reload' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/cfdc8b6c-4254-4f9c-9095-7886c4b8894a/reload HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:54 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/reload

/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/start
POST /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/start

Start a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance started
  • 400: Invalid request
  • 404: Instance doesn’t exist
Output
Name Mandatory Type Description
command_line string Last command line used by GNS3 to start QEMU
console integer Console TCP port
console_type enum Possible values: telnet
name string VPCS VM name
node_directory string Path to the VM working directory
node_id string Node UUID
project_id string Project UUID
startup_script ['string', 'null'] Content of the VPCS startup script
startup_script_path ['string', 'null'] Path of the VPCS startup script relative to project directory
status enum Possible values: started, stopped, suspended
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/27e35650-731f-48a5-a318-92e2c00031a8/start' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/27e35650-731f-48a5-a318-92e2c00031a8/start HTTP/1.1
{}


HTTP/1.1 200
Connection: close
Content-Length: 489
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:31:54 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/start

{
    "command_line": "",
    "console": 5004,
    "console_type": "telnet",
    "name": "PC TEST 1",
    "node_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp0ha7d1aj/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/27e35650-731f-48a5-a318-92e2c00031a8",
    "node_id": "27e35650-731f-48a5-a318-92e2c00031a8",
    "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
    "startup_script": null,
    "startup_script_path": null,
    "status": "stopped"
}
/v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/stop
POST /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/stop

Stop a VPCS instance

Parameters
  • project_id: Project UUID
  • node_id: Node UUID
Response status codes
  • 204: Instance stopped
  • 400: Invalid request
  • 404: Instance doesn’t exist
Sample session
curl -i -X POST 'http://localhost:3080/v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/bbe7cc55-ef05-4ae9-9d4c-b4aad8468c85/stop' -d '{}'

POST /v2/compute/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/nodes/bbe7cc55-ef05-4ae9-9d4c-b4aad8468c85/stop HTTP/1.1
{}


HTTP/1.1 204
Connection: close
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 21 Mar 2017 09:31:54 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/compute/projects/{project_id}/vpcs/nodes/{node_id}/stop

GNS3 developements

Development

Code convention

You should respect all the PEP8 convention except the rule about max line length.

Source code

Source code is available on github under GPL V3 licence: https://github.com/GNS3/

The GNS3 server: https://github.com/GNS3/gns3-server The Qt GUI: https://github.com/GNS3/gns3-gui

Documentation

In the gns3-server project.

Build doc

In the project root folder:

./scripts/documentation.sh

The output is available inside docs/_build/html

Tests

Run tests
py.test -v

GNS3 file formats

The .gns3

It’s the topology file of GNS3 this file is a JSON with all the informations about what is inside the topology.

A minimal version:

{
    "name": "untitled",
    "project_id": null,
    "revision": 5,
    "topology": {},
    "type": "topology",
    "version": "2.0.0"
}

The revision is the version of file format:

  • 7: GNS3 2.0
  • 6: GNS3 2.0 < beta 3
  • 5: GNS3 2.0 < alpha 4
  • 4: GNS3 1.5
  • 3: GNS3 1.4
  • 2: GNS3 1.3
  • 1: GNS3 1.0, 1.1, 1.2 (Not mentionned in the topology file)

And the full JSON schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "The topology",
    "type": "object",
    "properties": {
        "project_id": {
            "description": "Project UUID",
            "type": "string",
            "minLength": 36,
            "maxLength": 36,
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "type": {
            "description": "Type of file. It's always topology",
            "enum": [
                "topology"
            ]
        },
        "auto_start": {
            "description": "Start the topology when opened",
            "type": "boolean"
        },
        "auto_close": {
            "description": "Close the topology when no client is connected",
            "type": "boolean"
        },
        "auto_open": {
            "description": "Open the topology with GNS3",
            "type": "boolean"
        },
        "revision": {
            "description": "Version of the .gns3 specification.",
            "type": "integer"
        },
        "version": {
            "description": "Version of the GNS3 software which have update the file for the last time",
            "type": "string"
        },
        "name": {
            "type": "string",
            "description": "Name of the project"
        },
        "scene_height": {
            "type": "integer",
            "description": "Height of the drawing area"
        },
        "scene_width": {
            "type": "integer",
            "description": "Width of the drawing area"
        },
        "topology": {
            "description": "The topology content",
            "type": "object",
            "properties": {
                "computes": {
                    "description": "Computes servers",
                    "type": "array",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "description": "Request validation to a GNS3 compute object instance",
                        "type": "object",
                        "properties": {
                            "compute_id": {
                                "description": "Server identifier",
                                "type": "string"
                            },
                            "name": {
                                "description": "Server name",
                                "type": "string"
                            },
                            "protocol": {
                                "description": "Server protocol",
                                "enum": [
                                    "http",
                                    "https"
                                ]
                            },
                            "host": {
                                "description": "Server host",
                                "type": "string"
                            },
                            "port": {
                                "description": "Server port",
                                "type": "integer"
                            },
                            "user": {
                                "description": "User for authentication",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "connected": {
                                "description": "Whether the controller is connected to the compute server or not",
                                "type": "boolean"
                            },
                            "cpu_usage_percent": {
                                "description": "CPU usage of the compute. Read only",
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "maximum": 100,
                                "minimum": 0
                            },
                            "memory_usage_percent": {
                                "description": "RAM usage of the compute. Read only",
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "maximum": 100,
                                "minimum": 0
                            },
                            "capabilities": {
                                "$schema": "http://json-schema.org/draft-04/schema#",
                                "description": "Get what a server support",
                                "type": "object",
                                "required": [
                                    "version",
                                    "node_types"
                                ],
                                "properties": {
                                    "version": {
                                        "description": "Version number",
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "node_types": {
                                        "type": "array",
                                        "items": {
                                            "description": "Type of node",
                                            "enum": [
                                                "cloud",
                                                "nat",
                                                "ethernet_hub",
                                                "ethernet_switch",
                                                "frame_relay_switch",
                                                "atm_switch",
                                                "docker",
                                                "dynamips",
                                                "vpcs",
                                                "virtualbox",
                                                "vmware",
                                                "iou",
                                                "qemu"
                                            ]
                                        },
                                        "description": "Node type supported by the compute"
                                    },
                                    "platform": {
                                        "type": "string",
                                        "description": "Platform where the compute is running"
                                    }
                                },
                                "additionalProperties": false
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "compute_id",
                            "protocol",
                            "host",
                            "port",
                            "name"
                        ]
                    }
                },
                "drawings": {
                    "description": "Drawings elements",
                    "type": "array",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "description": "An drawing object",
                        "type": "object",
                        "properties": {
                            "drawing_id": {
                                "description": "Drawing UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "x": {
                                "description": "X property",
                                "type": "integer"
                            },
                            "y": {
                                "description": "Y property",
                                "type": "integer"
                            },
                            "z": {
                                "description": "Z property",
                                "type": "integer"
                            },
                            "rotation": {
                                "description": "Rotation of the element",
                                "type": "integer",
                                "minimum": -359,
                                "maximum": 360
                            },
                            "svg": {
                                "description": "SVG content of the drawing",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "links": {
                    "description": "Link elements",
                    "type": "array",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "description": "A link object",
                        "type": "object",
                        "properties": {
                            "link_id": {
                                "description": "Link UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "nodes": {
                                "description": "List of the VMS",
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "node_id": {
                                            "description": "Node UUID",
                                            "type": "string",
                                            "minLength": 36,
                                            "maxLength": 36,
                                            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                                        },
                                        "adapter_number": {
                                            "description": "Adapter number",
                                            "type": "integer"
                                        },
                                        "port_number": {
                                            "description": "Port number",
                                            "type": "integer"
                                        },
                                        "label": {
                                            "type": "object",
                                            "properties": {
                                                "text": {
                                                    "type": "string"
                                                },
                                                "style": {
                                                    "description": "SVG style attribute",
                                                    "type": "string"
                                                },
                                                "x": {
                                                    "description": "Relative X position of the label. If null center it",
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "y": {
                                                    "description": "Relative Y position of the label",
                                                    "type": "integer"
                                                },
                                                "rotation": {
                                                    "description": "Rotation of the label",
                                                    "type": "integer",
                                                    "minimum": -359,
                                                    "maximum": 360
                                                }
                                            },
                                            "required": [
                                                "text",
                                                "x",
                                                "y"
                                            ],
                                            "additionalProperties": false
                                        }
                                    },
                                    "required": [
                                        "node_id",
                                        "adapter_number",
                                        "port_number"
                                    ],
                                    "additionalProperties": false
                                }
                            },
                            "capturing": {
                                "description": "Read only property. True if a capture running on the link",
                                "type": "boolean"
                            },
                            "capture_file_name": {
                                "description": "Read only property. The name of the capture file if capture is running",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "capture_file_path": {
                                "description": "Read only property. The full path of the capture file if capture is running",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "link_type": {
                                "description": "Type of link",
                                "enum": [
                                    "ethernet",
                                    "serial"
                                ]
                            }
                        },
                        "required": [
                            "nodes"
                        ],
                        "additionalProperties": false
                    }
                },
                "nodes": {
                    "description": "Nodes elements",
                    "type": "array",
                    "items": {
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "description": "A node object",
                        "type": "object",
                        "properties": {
                            "compute_id": {
                                "description": "Compute identifier",
                                "type": "string"
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "node_id": {
                                "description": "Node UUID",
                                "type": "string",
                                "minLength": 36,
                                "maxLength": 36,
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "node_type": {
                                "description": "Type of node",
                                "enum": [
                                    "cloud",
                                    "nat",
                                    "ethernet_hub",
                                    "ethernet_switch",
                                    "frame_relay_switch",
                                    "atm_switch",
                                    "docker",
                                    "dynamips",
                                    "vpcs",
                                    "virtualbox",
                                    "vmware",
                                    "iou",
                                    "qemu"
                                ]
                            },
                            "node_directory": {
                                "description": "Working directory of the node. Read only",
                                "type": [
                                    "null",
                                    "string"
                                ]
                            },
                            "command_line": {
                                "description": "Command line use to start the node",
                                "type": [
                                    "null",
                                    "string"
                                ]
                            },
                            "name": {
                                "description": "Node name",
                                "type": "string",
                                "minLength": 1
                            },
                            "console": {
                                "description": "Console TCP port",
                                "minimum": 1,
                                "maximum": 65535,
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "console_host": {
                                "description": "Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.",
                                "type": "string",
                                "minLength": 1
                            },
                            "console_type": {
                                "description": "Console type",
                                "enum": [
                                    "vnc",
                                    "telnet",
                                    "http",
                                    null
                                ]
                            },
                            "properties": {
                                "description": "Properties specific to an emulator",
                                "type": "object"
                            },
                            "status": {
                                "description": "Status of the node",
                                "enum": [
                                    "stopped",
                                    "started",
                                    "suspended"
                                ]
                            },
                            "label": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string"
                                    },
                                    "style": {
                                        "description": "SVG style attribute",
                                        "type": "string"
                                    },
                                    "x": {
                                        "description": "Relative X position of the label. If null center it",
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "y": {
                                        "description": "Relative Y position of the label",
                                        "type": "integer"
                                    },
                                    "rotation": {
                                        "description": "Rotation of the label",
                                        "type": "integer",
                                        "minimum": -359,
                                        "maximum": 360
                                    }
                                },
                                "required": [
                                    "text",
                                    "x",
                                    "y"
                                ],
                                "additionalProperties": false
                            },
                            "symbol": {
                                "description": "Symbol of the node",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1
                            },
                            "width": {
                                "description": "Width of the node (Read only)",
                                "type": "integer"
                            },
                            "height": {
                                "description": "Height of the node (Read only)",
                                "type": "integer"
                            },
                            "x": {
                                "description": "X position of the node",
                                "type": "integer"
                            },
                            "y": {
                                "description": "Y position of the node",
                                "type": "integer"
                            },
                            "z": {
                                "description": "Z position of the node",
                                "type": "integer"
                            },
                            "port_name_format": {
                                "description": "Formating for port name {0} will be replace by port number",
                                "type": "string"
                            },
                            "port_segment_size": {
                                "description": "Size of the port segment",
                                "type": "integer",
                                "minimum": 0
                            },
                            "first_port_name": {
                                "description": "Name of the first port",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "ports": {
                                "description": "List of node ports READ only",
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "description": "A node port",
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "description": "Port name"
                                        },
                                        "short_name": {
                                            "type": "string",
                                            "description": "Short version of port name"
                                        },
                                        "adapter_number": {
                                            "type": "integer",
                                            "description": "Adapter slot"
                                        },
                                        "port_number": {
                                            "type": "integer",
                                            "description": "Port slot"
                                        },
                                        "link_type": {
                                            "description": "Type of link",
                                            "enum": [
                                                "ethernet",
                                                "serial"
                                            ]
                                        },
                                        "data_link_types": {
                                            "type": "object",
                                            "description": "Available PCAP type for capture",
                                            "properties": {}
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                }
            },
            "required": [
                "nodes",
                "links",
                "drawings",
                "computes"
            ],
            "additionalProperties": false
        }
    },
    "required": [
        "project_id",
        "type",
        "revision",
        "version",
        "name",
        "topology"
    ],
    "additionalProperties": false
}

The .net

It’s topologies made for GNS3 0.8

The .gns3p or .gns3project

It’s a zipped version of the .gns3 and all files require for a topology. The images could be included inside but are optionnals.

The zip could be a ZIP64 if the project is too big for standard zip file.

The .gns3a or .gns3appliance

This file contains details on how to import an appliance in GNS3.

A JSON schema is available here: https://github.com/GNS3/gns3-registry/blob/master/schemas/appliance.json

And samples here: https://github.com/GNS3/gns3-registry/tree/master/appliances