diff --git a/docs/api/examples/delete_projectsprojectid.txt b/docs/api/examples/delete_projectsprojectid.txt
new file mode 100644
index 00000000..45efff6c
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectid.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}'
+
+DELETE /projects/{project_id} HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}
+
diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt
new file mode 100644
index 00000000..ae225fce
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}'
+
+DELETE /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
+
diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..f8aa407f
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
+
+DELETE /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
diff --git a/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt
new file mode 100644
index 00000000..8b47125e
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}'
+
+DELETE /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
+
diff --git a/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..ebd74cfd
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
+
+DELETE /projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
diff --git a/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..d40be628
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
+
+DELETE /projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt
new file mode 100644
index 00000000..e9b9677c
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}'
+
+DELETE /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
+
diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..6842905a
--- /dev/null
+++ b/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,13 @@
+curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio'
+
+DELETE /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt
new file mode 100644
index 00000000..a34c7bc5
--- /dev/null
+++ b/docs/api/examples/get_interfaces.txt
@@ -0,0 +1,52 @@
+curl -i -X GET 'http://localhost:8000/interfaces'
+
+GET /interfaces HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 520
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/interfaces
+
+[
+ {
+ "id": "lo0",
+ "name": "lo0"
+ },
+ {
+ "id": "gif0",
+ "name": "gif0"
+ },
+ {
+ "id": "stf0",
+ "name": "stf0"
+ },
+ {
+ "id": "en0",
+ "name": "en0"
+ },
+ {
+ "id": "en1",
+ "name": "en1"
+ },
+ {
+ "id": "fw0",
+ "name": "fw0"
+ },
+ {
+ "id": "en2",
+ "name": "en2"
+ },
+ {
+ "id": "p2p0",
+ "name": "p2p0"
+ },
+ {
+ "id": "bridge0",
+ "name": "bridge0"
+ }
+]
diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/get_projectsprojectid.txt
new file mode 100644
index 00000000..559a0388
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectid.txt
@@ -0,0 +1,20 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}'
+
+GET /projects/{project_id} HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 277
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}
+
+{
+ "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpjlh4s0j0",
+ "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpjlh4s0j0/00010203-0405-0607-0809-0a0b0c0d0e0f",
+ "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f",
+ "temporary": false
+}
diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt
new file mode 100644
index 00000000..84850ddb
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt
@@ -0,0 +1,27 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}'
+
+GET /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 409
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
+
+{
+ "console": 2000,
+ "ethernet_adapters": 2,
+ "initial_config": null,
+ "l1_keepalives": false,
+ "name": "PC TEST 1",
+ "nvram": 128,
+ "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_get0/iou.bin",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "ram": 256,
+ "serial_adapters": 2,
+ "vm_id": "f75ff9e7-e658-45f7-9021-1651cfed1194"
+}
diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmidinitialconfig.txt b/docs/api/examples/get_projectsprojectidiouvmsvmidinitialconfig.txt
new file mode 100644
index 00000000..99bb7273
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectidiouvmsvmidinitialconfig.txt
@@ -0,0 +1,17 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/initial_config'
+
+GET /projects/{project_id}/iou/vms/{vm_id}/initial_config HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 25
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/initial_config
+
+{
+ "content": "TEST"
+}
diff --git a/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt
new file mode 100644
index 00000000..47159a3c
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt
@@ -0,0 +1,34 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}'
+
+GET /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 566
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
+
+{
+ "adapter_type": "e1000",
+ "adapters": 1,
+ "console": 2000,
+ "cpu_throttling": 0,
+ "hda_disk_image": "",
+ "hdb_disk_image": "",
+ "initrd": "",
+ "kernel_command_line": "",
+ "kernel_image": "",
+ "legacy_networking": false,
+ "monitor": 2001,
+ "name": "PC TEST 1",
+ "options": "",
+ "process_priority": "low",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
+ "ram": 256,
+ "vm_id": "b41caecc-86fc-4986-a0b2-36892ac8baba"
+}
diff --git a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt
new file mode 100644
index 00000000..9ddcdd09
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt
@@ -0,0 +1,26 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}'
+
+GET /projects/{project_id}/virtualbox/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 347
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
+
+{
+ "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
+ "adapters": 0,
+ "console": 2001,
+ "enable_remote_console": false,
+ "headless": false,
+ "name": "VMTEST",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "use_any_adapter": false,
+ "vm_id": "bb20d4fa-f233-400d-af07-2fbdcb337022",
+ "vmname": "VMTEST"
+}
diff --git a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt
new file mode 100644
index 00000000..56cdbf0d
--- /dev/null
+++ b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt
@@ -0,0 +1,21 @@
+curl -i -X GET 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}'
+
+GET /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 187
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
+
+{
+ "console": 2009,
+ "name": "PC TEST 1",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "startup_script": null,
+ "vm_id": "1b0843ea-4fcf-4d2a-94e8-bc3b7a92be88"
+}
diff --git a/docs/api/examples/get_qemubinaries.txt b/docs/api/examples/get_qemubinaries.txt
new file mode 100644
index 00000000..d65c7681
--- /dev/null
+++ b/docs/api/examples/get_qemubinaries.txt
@@ -0,0 +1,24 @@
+curl -i -X GET 'http://localhost:8000/qemu/binaries'
+
+GET /qemu/binaries HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 134
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/qemu/binaries
+
+[
+ {
+ "path": "/tmp/1",
+ "version": "2.2.0"
+ },
+ {
+ "path": "/tmp/2",
+ "version": "2.1.0"
+ }
+]
diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt
new file mode 100644
index 00000000..88017034
--- /dev/null
+++ b/docs/api/examples/get_version.txt
@@ -0,0 +1,17 @@
+curl -i -X GET 'http://localhost:8000/version'
+
+GET /version HTTP/1.1
+
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 29
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/version
+
+{
+ "version": "1.3.dev1"
+}
diff --git a/docs/api/examples/post_portsudp.txt b/docs/api/examples/post_portsudp.txt
new file mode 100644
index 00000000..3be4b74c
--- /dev/null
+++ b/docs/api/examples/post_portsudp.txt
@@ -0,0 +1,17 @@
+curl -i -X POST 'http://localhost:8000/ports/udp' -d '{}'
+
+POST /ports/udp HTTP/1.1
+{}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 25
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/ports/udp
+
+{
+ "udp_port": 10000
+}
diff --git a/docs/api/examples/post_projects.txt b/docs/api/examples/post_projects.txt
new file mode 100644
index 00000000..610adf2d
--- /dev/null
+++ b/docs/api/examples/post_projects.txt
@@ -0,0 +1,20 @@
+curl -i -X POST 'http://localhost:8000/projects' -d '{}'
+
+POST /projects HTTP/1.1
+{}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 277
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects
+
+{
+ "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpanmwxfqf",
+ "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpanmwxfqf/f0f4987c-b1d3-432f-a354-1179d1c727f9",
+ "project_id": "f0f4987c-b1d3-432f-a354-1179d1c727f9",
+ "temporary": false
+}
diff --git a/docs/api/examples/post_projectsprojectidclose.txt b/docs/api/examples/post_projectsprojectidclose.txt
new file mode 100644
index 00000000..bcc429c9
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidclose.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/close' -d '{}'
+
+POST /projects/{project_id}/close HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/close
+
diff --git a/docs/api/examples/post_projectsprojectidcommit.txt b/docs/api/examples/post_projectsprojectidcommit.txt
new file mode 100644
index 00000000..0b36f05d
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidcommit.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/commit' -d '{}'
+
+POST /projects/{project_id}/commit HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/commit
+
diff --git a/docs/api/examples/post_projectsprojectidiouvms.txt b/docs/api/examples/post_projectsprojectidiouvms.txt
new file mode 100644
index 00000000..65f5b1ce
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvms.txt
@@ -0,0 +1,36 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms' -d '{"ethernet_adapters": 0, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
+
+POST /projects/{project_id}/iou/vms HTTP/1.1
+{
+ "ethernet_adapters": 0,
+ "initial_config_content": "hostname test",
+ "l1_keepalives": true,
+ "name": "PC TEST 1",
+ "nvram": 512,
+ "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin",
+ "ram": 1024,
+ "serial_adapters": 4
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 440
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms
+
+{
+ "console": 2000,
+ "ethernet_adapters": 0,
+ "initial_config": "initial-config.cfg",
+ "l1_keepalives": true,
+ "name": "PC TEST 1",
+ "nvram": 512,
+ "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_create_with_params0/iou.bin",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "ram": 1024,
+ "serial_adapters": 4,
+ "vm_id": "20e66cd4-52ef-4ad2-a44e-16bce06fd6f2"
+}
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..5940e201
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,21 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+{
+ "ethernet_device": "eth0",
+ "type": "nio_generic_ethernet"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 69
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
+{
+ "ethernet_device": "eth0",
+ "type": "nio_generic_ethernet"
+}
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt
new file mode 100644
index 00000000..a43ed225
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt
@@ -0,0 +1,20 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture HTTP/1.1
+{
+ "capture_file_name": "test.pcap",
+ "data_link_type": "DLT_EN10MB"
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 158
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
+
+{
+ "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpd25gn8du/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
+}
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt
new file mode 100644
index 00000000..3b79347f
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture' -d '{}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
+
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt
new file mode 100644
index 00000000..f464b22e
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/reload' -d '{}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/reload HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/reload
+
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt
new file mode 100644
index 00000000..a82a5504
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/start' -d '{}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/start HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/start
+
diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt
new file mode 100644
index 00000000..281869a6
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/stop' -d '{}'
+
+POST /projects/{project_id}/iou/vms/{vm_id}/stop HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/stop
+
diff --git a/docs/api/examples/post_projectsprojectidqemuvms.txt b/docs/api/examples/post_projectsprojectidqemuvms.txt
new file mode 100644
index 00000000..c301f2da
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvms.txt
@@ -0,0 +1,39 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms' -d '{"hda_disk_image": "hda", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42", "ram": 1024}'
+
+POST /projects/{project_id}/qemu/vms HTTP/1.1
+{
+ "hda_disk_image": "hda",
+ "name": "PC TEST 1",
+ "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
+ "ram": 1024
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 570
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms
+
+{
+ "adapter_type": "e1000",
+ "adapters": 1,
+ "console": 2000,
+ "cpu_throttling": 0,
+ "hda_disk_image": "hda",
+ "hdb_disk_image": "",
+ "initrd": "",
+ "kernel_command_line": "",
+ "kernel_image": "",
+ "legacy_networking": false,
+ "monitor": 2001,
+ "name": "PC TEST 1",
+ "options": "",
+ "process_priority": "low",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
+ "ram": 1024,
+ "vm_id": "3176897a-996a-4020-86b8-3cd7a0031cbc"
+}
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..4419ebca
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,21 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+{
+ "ethernet_device": "eth0",
+ "type": "nio_generic_ethernet"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 69
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
+{
+ "ethernet_device": "eth0",
+ "type": "nio_generic_ethernet"
+}
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt
new file mode 100644
index 00000000..8c4e6d14
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/reload' -d '{}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/reload HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/reload
+
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt
new file mode 100644
index 00000000..86c13afa
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/resume' -d '{}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/resume HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/resume
+
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt
new file mode 100644
index 00000000..c2365ff2
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/start' -d '{}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/start HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/start
+
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt
new file mode 100644
index 00000000..4c85508e
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/stop' -d '{}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/stop HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/stop
+
diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt b/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt
new file mode 100644
index 00000000..5a412c66
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}/suspend' -d '{}'
+
+POST /projects/{project_id}/qemu/vms/{vm_id}/suspend HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/suspend
+
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt
new file mode 100644
index 00000000..7f6b4a53
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt
@@ -0,0 +1,30 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'
+
+POST /projects/{project_id}/virtualbox/vms HTTP/1.1
+{
+ "linked_clone": false,
+ "name": "VM1",
+ "vmname": "VM1"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 341
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms
+
+{
+ "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
+ "adapters": 0,
+ "console": 2000,
+ "enable_remote_console": false,
+ "headless": false,
+ "name": "VM1",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "use_any_adapter": false,
+ "vm_id": "8f384969-8478-4e8a-a6cd-c91376ccc89b",
+ "vmname": "VM1"
+}
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..25100dbb
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,25 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+{
+ "lport": 4242,
+ "rhost": "127.0.0.1",
+ "rport": 4343,
+ "type": "nio_udp"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 89
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
+{
+ "lport": 4242,
+ "rhost": "127.0.0.1",
+ "rport": 4343,
+ "type": "nio_udp"
+}
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt
new file mode 100644
index 00000000..50e6dc77
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/reload' -d '{}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/reload HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload
+
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt
new file mode 100644
index 00000000..7d27abb9
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/resume' -d '{}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/resume HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume
+
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt
new file mode 100644
index 00000000..d533f5f4
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/start' -d '{}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/start HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/start
+
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt
new file mode 100644
index 00000000..500f5c02
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/stop' -d '{}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/stop HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop
+
diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt
new file mode 100644
index 00000000..77945fc1
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}/suspend' -d '{}'
+
+POST /projects/{project_id}/virtualbox/vms/{vm_id}/suspend HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend
+
diff --git a/docs/api/examples/post_projectsprojectidvpcsvms.txt b/docs/api/examples/post_projectsprojectidvpcsvms.txt
new file mode 100644
index 00000000..8f7c689f
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvpcsvms.txt
@@ -0,0 +1,23 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms' -d '{"name": "PC TEST 1"}'
+
+POST /projects/{project_id}/vpcs/vms HTTP/1.1
+{
+ "name": "PC TEST 1"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 187
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms
+
+{
+ "console": 2009,
+ "name": "PC TEST 1",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "startup_script": null,
+ "vm_id": "90e4cc09-4013-4e94-97ce-3ca48676de22"
+}
diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
new file mode 100644
index 00000000..e55c4ace
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
@@ -0,0 +1,25 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
+
+POST /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1
+{
+ "lport": 4242,
+ "rhost": "127.0.0.1",
+ "rport": 4343,
+ "type": "nio_udp"
+}
+
+
+HTTP/1.1 201
+CONNECTION: keep-alive
+CONTENT-LENGTH: 89
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
+
+{
+ "lport": 4242,
+ "rhost": "127.0.0.1",
+ "rport": 4343,
+ "type": "nio_udp"
+}
diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt
new file mode 100644
index 00000000..ad8d4282
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/reload' -d '{}'
+
+POST /projects/{project_id}/vpcs/vms/{vm_id}/reload HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/reload
+
diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt
new file mode 100644
index 00000000..cd597019
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/start' -d '{}'
+
+POST /projects/{project_id}/vpcs/vms/{vm_id}/start HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/start
+
diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt
new file mode 100644
index 00000000..8d4f0127
--- /dev/null
+++ b/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt
@@ -0,0 +1,13 @@
+curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/stop' -d '{}'
+
+POST /projects/{project_id}/vpcs/vms/{vm_id}/stop HTTP/1.1
+{}
+
+
+HTTP/1.1 204
+CONNECTION: keep-alive
+CONTENT-LENGTH: 0
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/stop
+
diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt
new file mode 100644
index 00000000..2f6c1452
--- /dev/null
+++ b/docs/api/examples/post_version.txt
@@ -0,0 +1,19 @@
+curl -i -X POST 'http://localhost:8000/version' -d '{"version": "1.3.dev1"}'
+
+POST /version HTTP/1.1
+{
+ "version": "1.3.dev1"
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 29
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/version
+
+{
+ "version": "1.3.dev1"
+}
diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/put_projectsprojectid.txt
new file mode 100644
index 00000000..26774c07
--- /dev/null
+++ b/docs/api/examples/put_projectsprojectid.txt
@@ -0,0 +1,20 @@
+curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_update_path_project_non_l0"}'
+
+PUT /projects/{project_id} HTTP/1.1
+{
+ "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_update_path_project_non_l0"
+}
+
+
+HTTP/1.1 403
+CONNECTION: keep-alive
+CONTENT-LENGTH: 100
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}
+
+{
+ "message": "You are not allowed to modify the project directory location",
+ "status": 403
+}
diff --git a/docs/api/examples/put_projectsprojectidiouvmsvmid.txt b/docs/api/examples/put_projectsprojectidiouvmsvmid.txt
new file mode 100644
index 00000000..7c4c1058
--- /dev/null
+++ b/docs/api/examples/put_projectsprojectidiouvmsvmid.txt
@@ -0,0 +1,36 @@
+curl -i -X PUT 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}' -d '{"console": 2001, "ethernet_adapters": 4, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0}'
+
+PUT /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1
+{
+ "console": 2001,
+ "ethernet_adapters": 4,
+ "initial_config_content": "hostname test",
+ "l1_keepalives": true,
+ "name": "test",
+ "nvram": 2048,
+ "ram": 512,
+ "serial_adapters": 0
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 423
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
+
+{
+ "console": 2001,
+ "ethernet_adapters": 4,
+ "initial_config": "initial-config.cfg",
+ "l1_keepalives": true,
+ "name": "test",
+ "nvram": 2048,
+ "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3621/test_iou_update0/iou.bin",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "ram": 512,
+ "serial_adapters": 0,
+ "vm_id": "e867af73-aaf1-4770-a935-78a357ea5db3"
+}
diff --git a/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt
new file mode 100644
index 00000000..b52c7a2d
--- /dev/null
+++ b/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt
@@ -0,0 +1,39 @@
+curl -i -X PUT 'http://localhost:8000/projects/{project_id}/qemu/vms/{vm_id}' -d '{"console": 2002, "hdb_disk_image": "hdb", "name": "test", "ram": 1024}'
+
+PUT /projects/{project_id}/qemu/vms/{vm_id} HTTP/1.1
+{
+ "console": 2002,
+ "hdb_disk_image": "hdb",
+ "name": "test",
+ "ram": 1024
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 565
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
+
+{
+ "adapter_type": "e1000",
+ "adapters": 1,
+ "console": 2002,
+ "cpu_throttling": 0,
+ "hda_disk_image": "",
+ "hdb_disk_image": "hdb",
+ "initrd": "",
+ "kernel_command_line": "",
+ "kernel_image": "",
+ "legacy_networking": false,
+ "monitor": 2001,
+ "name": "test",
+ "options": "",
+ "process_priority": "low",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpu7smjb0q/qemu_x42",
+ "ram": 1024,
+ "vm_id": "8a0d735b-d485-4a2e-bae1-be54f426fbeb"
+}
diff --git a/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt
new file mode 100644
index 00000000..8f37d59d
--- /dev/null
+++ b/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt
@@ -0,0 +1,29 @@
+curl -i -X PUT 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}' -d '{"console": 2010, "name": "test"}'
+
+PUT /projects/{project_id}/virtualbox/vms/{vm_id} HTTP/1.1
+{
+ "console": 2010,
+ "name": "test"
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 345
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
+
+{
+ "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
+ "adapters": 0,
+ "console": 2010,
+ "enable_remote_console": false,
+ "headless": false,
+ "name": "test",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "use_any_adapter": false,
+ "vm_id": "dcf2c555-703d-47cb-9dd2-8ee6c11b9f6c",
+ "vmname": "VMTEST"
+}
diff --git a/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt
new file mode 100644
index 00000000..532b274b
--- /dev/null
+++ b/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt
@@ -0,0 +1,25 @@
+curl -i -X PUT 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}'
+
+PUT /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1
+{
+ "console": 2011,
+ "name": "test",
+ "startup_script": "ip 192.168.1.1"
+}
+
+
+HTTP/1.1 200
+CONNECTION: keep-alive
+CONTENT-LENGTH: 194
+CONTENT-TYPE: application/json
+DATE: Thu, 08 Jan 2015 16:09:15 GMT
+SERVER: Python/3.4 GNS3/1.3.dev1
+X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
+
+{
+ "console": 2011,
+ "name": "test",
+ "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
+ "startup_script": "ip 192.168.1.1",
+ "vm_id": "f27aa7da-e267-483a-adc6-2587e1377e8c"
+}
diff --git a/docs/api/upload.rst b/docs/api/upload.rst
deleted file mode 100644
index 51e901b0..00000000
--- a/docs/api/upload.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-Upload
----------------------
-
-.. toctree::
- :glob:
- :maxdepth: 2
-
- upload/*
diff --git a/docs/api/upload/upload.rst b/docs/api/upload/upload.rst
deleted file mode 100644
index f716f9fe..00000000
--- a/docs/api/upload/upload.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-/upload
-----------------------------------------------------------------------------------------------------------------------
-
-.. contents::
-
-GET /upload
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Manage upload of GNS3 images
-
-Response status codes
-**********************
-- **200**: OK
-
-
-POST /upload
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Manage upload of GNS3 images
-
-Response status codes
-**********************
-- **200**: OK
-
diff --git a/docs/api/api.dynamips_device.rst b/docs/api/v1/dynamips_device.rst
similarity index 75%
rename from docs/api/api.dynamips_device.rst
rename to docs/api/v1/dynamips_device.rst
index c5cd1ff6..83c17b94 100644
--- a/docs/api/api.dynamips_device.rst
+++ b/docs/api/v1/dynamips_device.rst
@@ -5,4 +5,4 @@ Dynamips device
:glob:
:maxdepth: 2
- api.dynamips_device/*
+ dynamips_device/*
diff --git a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevices.rst b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevices.rst
similarity index 100%
rename from docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevices.rst
rename to docs/api/v1/dynamips_device/projectsprojectiddynamipsdevices.rst
diff --git a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst
similarity index 100%
rename from docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst
rename to docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst
diff --git a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst
similarity index 100%
rename from docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst
rename to docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst
index 706b5c06..0533ad08 100644
--- a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst
+++ b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst
@@ -10,8 +10,8 @@ Add a NIO to a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
-- **device_id**: UUID for the instance
- **port_number**: Port on the device
+- **device_id**: UUID for the instance
Response status codes
**********************
@@ -129,8 +129,8 @@ Remove a NIO from a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
-- **device_id**: UUID for the instance
- **port_number**: Port on the device
+- **device_id**: UUID for the instance
Response status codes
**********************
diff --git a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst
similarity index 100%
rename from docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst
rename to docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst
index 19852f49..117cd928 100644
--- a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst
+++ b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst
@@ -10,8 +10,8 @@ Start a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
-- **device_id**: UUID for the instance
- **port_number**: Port on the device
+- **device_id**: UUID for the instance
Response status codes
**********************
diff --git a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst
similarity index 100%
rename from docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst
rename to docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst
index cc312e43..9674ef65 100644
--- a/docs/api/api.dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst
+++ b/docs/api/v1/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst
@@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
-- **device_id**: UUID for the instance
- **port_number**: Port on the device
+- **device_id**: UUID for the instance
Response status codes
**********************
diff --git a/docs/api/api.dynamips_vm.rst b/docs/api/v1/dynamips_vm.rst
similarity index 78%
rename from docs/api/api.dynamips_vm.rst
rename to docs/api/v1/dynamips_vm.rst
index c4851bfe..f32d26b7 100644
--- a/docs/api/api.dynamips_vm.rst
+++ b/docs/api/v1/dynamips_vm.rst
@@ -5,4 +5,4 @@ Dynamips vm
:glob:
:maxdepth: 2
- api.dynamips_vm/*
+ dynamips_vm/*
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvms.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvms.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvms.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvms.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmid.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmid.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
index c1c114ec..13c726c7 100644
--- a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
+++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter where the nio should be added
-- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter
Response status codes
**********************
@@ -29,8 +29,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter from where the nio should be removed
-- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter
Response status codes
**********************
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
index 57271aac..16b5b121 100644
--- a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
+++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
-- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter
Response status codes
**********************
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
index c3b44232..5522c169 100644
--- a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
+++ b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
-- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidautoidlepc.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidautoidlepc.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidconfigs.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidconfigs.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmididlepcproposals.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmididlepcproposals.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidreload.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidreload.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidresume.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidresume.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidstart.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidstart.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidstop.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidstop.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst
diff --git a/docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidsuspend.rst b/docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst
similarity index 100%
rename from docs/api/api.dynamips_vm/v1projectsprojectiddynamipsvmsvmidsuspend.rst
rename to docs/api/v1/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst
diff --git a/docs/api/api.iou.rst b/docs/api/v1/iou.rst
similarity index 83%
rename from docs/api/api.iou.rst
rename to docs/api/v1/iou.rst
index a04ef778..c2188031 100644
--- a/docs/api/api.iou.rst
+++ b/docs/api/v1/iou.rst
@@ -5,4 +5,4 @@ Iou
:glob:
:maxdepth: 2
- api.iou/*
+ iou/*
diff --git a/docs/api/api.iou/v1projectsprojectidiouvms.rst b/docs/api/v1/iou/projectsprojectidiouvms.rst
similarity index 97%
rename from docs/api/api.iou/v1projectsprojectidiouvms.rst
rename to docs/api/v1/iou/projectsprojectidiouvms.rst
index 281eccd2..5944bf4d 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvms.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvms.rst
@@ -54,3 +54,9 @@ Output
vm_id | ✔ | string | IOU VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvms.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmid.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmid.rst
similarity index 96%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmid.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmid.rst
index 4ba73e3a..b4bb82f6 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmid.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmid.rst
@@ -37,6 +37,12 @@ Output
vm_id | ✔ | string | IOU VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmid.txt
+
PUT /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -90,6 +96,12 @@ Output
vm_id | ✔ | string | IOU VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/put_projectsprojectidiouvmsvmid.txt
+
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -106,3 +118,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmid.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst
similarity index 83%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst
index 643f5a12..6b9abacb 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
+- **port_number**: Port where the nio should be added
Response status codes
**********************
@@ -20,6 +20,12 @@ Response status codes
- **201**: NIO created
- **404**: Instance doesn't exist
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -29,8 +35,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
+- **port_number**: Port from where the nio should be removed
Response status codes
**********************
@@ -38,3 +44,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: NIO deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
similarity index 90%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
index 3c31f1ef..31e72cd4 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
-- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter
Response status codes
**********************
@@ -30,3 +30,9 @@ Input
data_link_type | ✔ | string | PCAP data link type |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
similarity index 85%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
index e8da18d1..ca5e1abc 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
-- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
@@ -20,3 +20,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Capture stopped
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidinitialconfig.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidinitialconfig.rst
similarity index 89%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidinitialconfig.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidinitialconfig.rst
index 8e56bf25..6159e783 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidinitialconfig.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidinitialconfig.rst
@@ -22,3 +22,9 @@ Output
content | ✔ | ['string', 'null'] | Content of the initial configuration file |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmidinitialconfig.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidreload.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidreload.rst
similarity index 85%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidreload.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidreload.rst
index ffdf82b3..49be3d31 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidreload.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidreload.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance reloaded
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidreload.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidstart.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidstart.rst
similarity index 85%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidstart.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidstart.rst
index 7ef3f580..25a9e236 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidstart.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidstart.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance started
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstart.txt
+
diff --git a/docs/api/api.iou/v1projectsprojectidiouvmsvmidstop.rst b/docs/api/v1/iou/projectsprojectidiouvmsvmidstop.rst
similarity index 85%
rename from docs/api/api.iou/v1projectsprojectidiouvmsvmidstop.rst
rename to docs/api/v1/iou/projectsprojectidiouvmsvmidstop.rst
index dd2e81f5..220c81ad 100644
--- a/docs/api/api.iou/v1projectsprojectidiouvmsvmidstop.rst
+++ b/docs/api/v1/iou/projectsprojectidiouvmsvmidstop.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance stopped
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstop.txt
+
diff --git a/docs/api/api.network.rst b/docs/api/v1/network.rst
similarity index 80%
rename from docs/api/api.network.rst
rename to docs/api/v1/network.rst
index 886cd394..38366abe 100644
--- a/docs/api/api.network.rst
+++ b/docs/api/v1/network.rst
@@ -5,4 +5,4 @@ Network
:glob:
:maxdepth: 2
- api.network/*
+ network/*
diff --git a/docs/api/api.network/v1interfaces.rst b/docs/api/v1/network/interfaces.rst
similarity index 82%
rename from docs/api/api.network/v1interfaces.rst
rename to docs/api/v1/network/interfaces.rst
index 2a1071f3..35036d57 100644
--- a/docs/api/api.network/v1interfaces.rst
+++ b/docs/api/v1/network/interfaces.rst
@@ -11,3 +11,9 @@ Response status codes
**********************
- **200**: OK
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_interfaces.txt
+
diff --git a/docs/api/api.network/v1portsudp.rst b/docs/api/v1/network/portsudp.rst
similarity index 82%
rename from docs/api/api.network/v1portsudp.rst
rename to docs/api/v1/network/portsudp.rst
index 0d6f7975..c37318ed 100644
--- a/docs/api/api.network/v1portsudp.rst
+++ b/docs/api/v1/network/portsudp.rst
@@ -11,3 +11,9 @@ Response status codes
**********************
- **201**: UDP port allocated
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_portsudp.txt
+
diff --git a/docs/api/api.project.rst b/docs/api/v1/project.rst
similarity index 80%
rename from docs/api/api.project.rst
rename to docs/api/v1/project.rst
index 703ef19c..95453d81 100644
--- a/docs/api/api.project.rst
+++ b/docs/api/v1/project.rst
@@ -5,4 +5,4 @@ Project
:glob:
:maxdepth: 2
- api.project/*
+ project/*
diff --git a/docs/api/api.project/v1projects.rst b/docs/api/v1/project/projects.rst
similarity index 96%
rename from docs/api/api.project/v1projects.rst
rename to docs/api/v1/project/projects.rst
index 9ace36fe..2cc133fb 100644
--- a/docs/api/api.project/v1projects.rst
+++ b/docs/api/v1/project/projects.rst
@@ -34,3 +34,9 @@ Output
temporary | ✔ | boolean | If project is a temporary project |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projects.txt
+
diff --git a/docs/api/api.project/v1projectsprojectid.rst b/docs/api/v1/project/projectsprojectid.rst
similarity index 93%
rename from docs/api/api.project/v1projectsprojectid.rst
rename to docs/api/v1/project/projectsprojectid.rst
index c1a70376..bed089de 100644
--- a/docs/api/api.project/v1projectsprojectid.rst
+++ b/docs/api/v1/project/projectsprojectid.rst
@@ -28,6 +28,12 @@ Output
temporary | ✔ | boolean | If project is a temporary project |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectid.txt
+
PUT /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -65,6 +71,12 @@ Output
temporary | ✔ | boolean | If project is a temporary project |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/put_projectsprojectid.txt
+
DELETE /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -79,3 +91,9 @@ Response status codes
- **404**: The project doesn't exist
- **204**: Changes have been written on disk
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectid.txt
+
diff --git a/docs/api/api.project/v1projectsprojectidclose.rst b/docs/api/v1/project/projectsprojectidclose.rst
similarity index 84%
rename from docs/api/api.project/v1projectsprojectidclose.rst
rename to docs/api/v1/project/projectsprojectidclose.rst
index c0623c9b..5f9b867f 100644
--- a/docs/api/api.project/v1projectsprojectidclose.rst
+++ b/docs/api/v1/project/projectsprojectidclose.rst
@@ -16,3 +16,9 @@ Response status codes
- **404**: The project doesn't exist
- **204**: The project has been closed
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidclose.txt
+
diff --git a/docs/api/api.project/v1projectsprojectidcommit.rst b/docs/api/v1/project/projectsprojectidcommit.rst
similarity index 84%
rename from docs/api/api.project/v1projectsprojectidcommit.rst
rename to docs/api/v1/project/projectsprojectidcommit.rst
index 49c6fb8a..f08f2a33 100644
--- a/docs/api/api.project/v1projectsprojectidcommit.rst
+++ b/docs/api/v1/project/projectsprojectidcommit.rst
@@ -16,3 +16,9 @@ Response status codes
- **404**: The project doesn't exist
- **204**: Changes have been written on disk
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidcommit.txt
+
diff --git a/docs/api/api.qemu.rst b/docs/api/v1/qemu.rst
similarity index 82%
rename from docs/api/api.qemu.rst
rename to docs/api/v1/qemu.rst
index 553c3953..70fd8fc2 100644
--- a/docs/api/api.qemu.rst
+++ b/docs/api/v1/qemu.rst
@@ -5,4 +5,4 @@ Qemu
:glob:
:maxdepth: 2
- api.qemu/*
+ qemu/*
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvms.rst b/docs/api/v1/qemu/projectsprojectidqemuvms.rst
similarity index 98%
rename from docs/api/api.qemu/v1projectsprojectidqemuvms.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvms.rst
index 4a88a237..155fa581 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvms.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvms.rst
@@ -68,3 +68,9 @@ Output
vm_id | ✔ | string | QEMU VM uuid |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvms.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmid.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst
similarity index 97%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmid.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst
index e90b3cfd..0270bbd9 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmid.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmid.rst
@@ -44,6 +44,12 @@ Output
vm_id | ✔ | string | QEMU VM uuid |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectidqemuvmsvmid.txt
+
PUT /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -111,6 +117,12 @@ Output
vm_id | ✔ | string | QEMU VM uuid |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/put_projectsprojectidqemuvmsvmid.txt
+
DELETE /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -127,3 +139,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidqemuvmsvmid.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst
similarity index 83%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst
index a5515da9..985f53e0 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
+- **port_number**: Port where the nio should be added
Response status codes
**********************
@@ -20,6 +20,12 @@ Response status codes
- **201**: NIO created
- **404**: Instance doesn't exist
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
DELETE /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -29,8 +35,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
+- **port_number**: Port from where the nio should be removed
Response status codes
**********************
@@ -38,3 +44,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: NIO deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidreload.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidreload.rst
similarity index 85%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidreload.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidreload.rst
index 04e239f6..5b29cec3 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidreload.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidreload.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance reloaded
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidreload.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidresume.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidresume.rst
similarity index 85%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidresume.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidresume.rst
index a06a45c2..59b5c1f7 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidresume.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidresume.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance resumed
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidresume.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstart.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidstart.rst
similarity index 85%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstart.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidstart.rst
index d2649825..f5306892 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstart.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidstart.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance started
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidstart.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstop.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidstop.rst
similarity index 85%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstop.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidstop.rst
index be132747..d5c41c96 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidstop.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidstop.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance stopped
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidstop.txt
+
diff --git a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidsuspend.rst b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidsuspend.rst
similarity index 85%
rename from docs/api/api.qemu/v1projectsprojectidqemuvmsvmidsuspend.rst
rename to docs/api/v1/qemu/projectsprojectidqemuvmsvmidsuspend.rst
index 26f4216b..63e8c94a 100644
--- a/docs/api/api.qemu/v1projectsprojectidqemuvmsvmidsuspend.rst
+++ b/docs/api/v1/qemu/projectsprojectidqemuvmsvmidsuspend.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance suspended
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidqemuvmsvmidsuspend.txt
+
diff --git a/docs/api/api.qemu/v1qemubinaries.rst b/docs/api/v1/qemu/qemubinaries.rst
similarity index 84%
rename from docs/api/api.qemu/v1qemubinaries.rst
rename to docs/api/v1/qemu/qemubinaries.rst
index 4d9494bb..6f851195 100644
--- a/docs/api/api.qemu/v1qemubinaries.rst
+++ b/docs/api/v1/qemu/qemubinaries.rst
@@ -13,3 +13,9 @@ Response status codes
- **400**: Invalid request
- **404**: Instance doesn't exist
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_qemubinaries.txt
+
diff --git a/docs/api/api.version.rst b/docs/api/v1/version.rst
similarity index 80%
rename from docs/api/api.version.rst
rename to docs/api/v1/version.rst
index 62427503..adc4c1f0 100644
--- a/docs/api/api.version.rst
+++ b/docs/api/v1/version.rst
@@ -5,4 +5,4 @@ Version
:glob:
:maxdepth: 2
- api.version/*
+ version/*
diff --git a/docs/api/api.version/v1version.rst b/docs/api/v1/version/version.rst
similarity index 91%
rename from docs/api/api.version/v1version.rst
rename to docs/api/v1/version/version.rst
index 2fdf1edb..8733379d 100644
--- a/docs/api/api.version/v1version.rst
+++ b/docs/api/v1/version/version.rst
@@ -20,6 +20,12 @@ Output
version | ✔ | string | Version number human readable |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_version.txt
+
POST /v1/version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -48,3 +54,9 @@ Output
version | ✔ | string | Version number human readable |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_version.txt
+
diff --git a/docs/api/api.virtualbox.rst b/docs/api/v1/virtualbox.rst
similarity index 78%
rename from docs/api/api.virtualbox.rst
rename to docs/api/v1/virtualbox.rst
index e1700535..517624b2 100644
--- a/docs/api/api.virtualbox.rst
+++ b/docs/api/v1/virtualbox.rst
@@ -5,4 +5,4 @@ Virtualbox
:glob:
:maxdepth: 2
- api.virtualbox/*
+ virtualbox/*
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvms.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvms.rst
similarity index 97%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvms.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvms.rst
index 8f85e7a5..03d96831 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvms.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvms.rst
@@ -53,3 +53,9 @@ Output
vmname | | string | VirtualBox VM name (in VirtualBox itself) |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvms.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmid.rst
similarity index 96%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmid.rst
index b1cf371d..8ec38157 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmid.rst
@@ -36,6 +36,12 @@ Output
vmname | | string | VirtualBox VM name (in VirtualBox itself) |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectidvirtualboxvmsvmid.txt
+
PUT /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -87,6 +93,12 @@ Output
vmname | | string | VirtualBox VM name (in VirtualBox itself) |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/put_projectsprojectidvirtualboxvmsvmid.txt
+
DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst
similarity index 83%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst
index e670257d..8e8016f4 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter where the nio should be added
-- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
@@ -20,6 +20,12 @@ Response status codes
- **201**: NIO created
- **404**: Instance doesn't exist
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -29,8 +35,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter from where the nio should be removed
-- **port_number**: Port on the adapter (always)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always)
Response status codes
**********************
@@ -38,3 +44,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: NIO deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
similarity index 100%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
index 47b4fdca..31103c86 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
-- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
similarity index 100%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
index 057170b0..0571712e 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
-- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
+- **port_number**: Port on the adapter (always 0)
Response status codes
**********************
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst
similarity index 84%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst
index 66771462..9ae84c29 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance reloaded
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidreload.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst
similarity index 85%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst
index 58e70528..0fb9d427 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance resumed
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidresume.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst
similarity index 84%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst
index bd324d65..5e6a6c42 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance started
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidstart.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst
similarity index 84%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst
index 7d4ef0ee..1eaac889 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance stopped
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidstop.txt
+
diff --git a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst
similarity index 84%
rename from docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst
rename to docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst
index 6f84582e..ad7f469b 100644
--- a/docs/api/api.virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst
+++ b/docs/api/v1/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance suspended
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt
+
diff --git a/docs/api/api.virtualbox/v1virtualboxvms.rst b/docs/api/v1/virtualbox/virtualboxvms.rst
similarity index 100%
rename from docs/api/api.virtualbox/v1virtualboxvms.rst
rename to docs/api/v1/virtualbox/virtualboxvms.rst
diff --git a/docs/api/api.vpcs.rst b/docs/api/v1/vpcs.rst
similarity index 82%
rename from docs/api/api.vpcs.rst
rename to docs/api/v1/vpcs.rst
index e4b06735..ab00c921 100644
--- a/docs/api/api.vpcs.rst
+++ b/docs/api/v1/vpcs.rst
@@ -5,4 +5,4 @@ Vpcs
:glob:
:maxdepth: 2
- api.vpcs/*
+ vpcs/*
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvms.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvms.rst
similarity index 96%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvms.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvms.rst
index c59992e6..8b66e040 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvms.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvms.rst
@@ -42,3 +42,9 @@ Output
vm_id | ✔ | string | VPCS VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvpcsvms.txt
+
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmid.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmid.rst
similarity index 93%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmid.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvmsvmid.rst
index a7867e67..dcfee3cf 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmid.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmid.rst
@@ -31,6 +31,12 @@ Output
vm_id | ✔ | string | VPCS VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/get_projectsprojectidvpcsvmsvmid.txt
+
PUT /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -72,6 +78,12 @@ Output
vm_id | ✔ | string | VPCS VM UUID |
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/put_projectsprojectidvpcsvmsvmid.txt
+
DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -88,3 +100,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidvpcsvmsvmid.txt
+
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
similarity index 83%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
index ce72f5d7..fcfff01d 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst
@@ -11,8 +11,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
+- **port_number**: Port where the nio should be added
Response status codes
**********************
@@ -20,6 +20,12 @@ Response status codes
- **201**: NIO created
- **404**: Instance doesn't exist
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -29,8 +35,8 @@ Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
-- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
+- **port_number**: Port from where the nio should be removed
Response status codes
**********************
@@ -38,3 +44,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: NIO deleted
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt
+
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidreload.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidreload.rst
similarity index 85%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidreload.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidreload.rst
index 4736a952..224798fd 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidreload.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidreload.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance reloaded
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvpcsvmsvmidreload.txt
+
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstart.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstart.rst
similarity index 85%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstart.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstart.rst
index 285b711b..b87f43a6 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstart.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstart.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance started
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvpcsvmsvmidstart.txt
+
diff --git a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstop.rst b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstop.rst
similarity index 85%
rename from docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstop.rst
rename to docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstop.rst
index 9f65fe19..269c8953 100644
--- a/docs/api/api.vpcs/v1projectsprojectidvpcsvmsvmidstop.rst
+++ b/docs/api/v1/vpcs/projectsprojectidvpcsvmsvmidstop.rst
@@ -18,3 +18,9 @@ Response status codes
- **404**: Instance doesn't exist
- **204**: Instance stopped
+Sample session
+***************
+
+
+.. literalinclude:: ../../examples/post_projectsprojectidvpcsvmsvmidstop.txt
+
diff --git a/docs/index.rst b/docs/index.rst
index 35f652b5..4f12a125 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -18,5 +18,5 @@ API Endpoints
:glob:
:maxdepth: 2
- api/*
+ api/v1/*
diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py
index fd972529..05ae9af3 100644
--- a/gns3server/web/documentation.py
+++ b/gns3server/web/documentation.py
@@ -27,18 +27,28 @@ class Documentation(object):
"""Extract API documentation as Sphinx compatible files"""
- def __init__(self, route):
+ def __init__(self, route, directory):
+ """
+ :param route: Route instance
+ :param directory: Output directory
+ """
self._documentation = route.get_documentation()
+ self._directory = directory
def write(self):
for handler_name in sorted(self._documentation):
- self._create_handler_directory(handler_name)
-
for path in sorted(self._documentation[handler_name]):
+
+ api_version = self._documentation[handler_name][path]["api_version"]
+ if api_version is None:
+ continue
+
+ self._create_handler_directory(handler_name, api_version)
+
filename = self._file_path(path)
handler_doc = self._documentation[handler_name][path]
- with open("docs/api/{}/{}.rst".format(handler_name, filename), 'w+') as f:
+ with open("{}/api/v{}/{}/{}.rst".format(self._directory, api_version, handler_name, filename), 'w+') as f:
f.write('{}\n----------------------------------------------------------------------------------------------------------------------\n\n'.format(path))
f.write('.. contents::\n')
for method in handler_doc["methods"]:
@@ -68,29 +78,29 @@ class Documentation(object):
f.write("Output\n*******\n")
self._write_json_schema(f, method["output_schema"])
- self._include_query_example(f, method, path)
+ self._include_query_example(f, method, path, api_version)
- def _create_handler_directory(self, handler_name):
+ def _create_handler_directory(self, handler_name, api_version):
"""Create a directory for the handler and add an index inside"""
- directory = "docs/api/{}".format(handler_name)
+ directory = "{}/api/v{}/{}".format(self._directory, api_version, handler_name)
os.makedirs(directory, exist_ok=True)
- with open("docs/api/{}.rst".format(handler_name), "w+") as f:
+ with open("{}/api/v{}/{}.rst".format(self._directory, api_version, handler_name), "w+") as f:
f.write(handler_name.replace("api.", "").replace("_", " ", ).capitalize())
f.write("\n---------------------\n\n")
f.write(".. toctree::\n :glob:\n :maxdepth: 2\n\n {}/*\n".format(handler_name))
- def _include_query_example(self, f, method, path):
+ def _include_query_example(self, f, method, path, api_version):
"""If a sample session is available we include it in documentation"""
m = method["method"].lower()
- query_path = "examples/{}_{}.txt".format(m, self._file_path(path))
- if os.path.isfile("docs/api/{}".format(query_path)):
+ query_path = "{}_{}.txt".format(m, self._file_path(path))
+ if os.path.isfile(os.path.join(self._directory, "api", "examples", query_path)):
f.write("Sample session\n***************\n")
- f.write("\n\n.. literalinclude:: {}\n\n".format(query_path))
+ f.write("\n\n.. literalinclude:: ../../examples/{}\n\n".format(query_path))
def _file_path(self, path):
- return re.sub('[^a-z0-9]', '', path)
+ return re.sub("^v1", "", re.sub("[^a-z0-9]", "", path))
def _write_definitions(self, f, schema):
if "definitions" in schema:
@@ -148,4 +158,4 @@ class Documentation(object):
if __name__ == '__main__':
print("Generate API documentation")
- Documentation(Route).write()
+ Documentation(Route, "docs").write()
diff --git a/gns3server/web/route.py b/gns3server/web/route.py
index 93b10eed..a26a8f8b 100644
--- a/gns3server/web/route.py
+++ b/gns3server/web/route.py
@@ -92,9 +92,10 @@ class Route(object):
def register(func):
route = cls._path
- handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.", "")
+ handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.api.", "")
cls._documentation.setdefault(handler, {})
- cls._documentation[handler].setdefault(route, {"methods": []})
+ cls._documentation[handler].setdefault(route, {"api_version": api_version,
+ "methods": []})
cls._documentation[handler][route]["methods"].append({
"method": method,
diff --git a/scripts/documentation.sh b/scripts/documentation.sh
index fff4ed24..41111993 100755
--- a/scripts/documentation.sh
+++ b/scripts/documentation.sh
@@ -28,7 +28,7 @@ export PYTEST_BUILD_DOCUMENTATION=1
rm -Rf docs/api/
mkdir -p docs/api/examples
-#py.test -v
+py.test -v
python3 gns3server/web/documentation.py
cd docs
make html
diff --git a/tests/handlers/api/test_iou.py b/tests/handlers/api/test_iou.py
index 5e1b29dc..5221f0eb 100644
--- a/tests/handlers/api/test_iou.py
+++ b/tests/handlers/api/test_iou.py
@@ -104,28 +104,28 @@ def test_iou_get(server, project, vm):
def test_iou_start(server, vm):
with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.start", return_value=True) as mock:
- response = server.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_iou_stop(server, vm):
with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.stop", return_value=True) as mock:
- response = server.post("/projects/{project_id}/iou/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/iou/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_iou_reload(server, vm):
with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.reload", return_value=True) as mock:
- response = server.post("/projects/{project_id}/iou/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/iou/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_iou_delete(server, vm):
with asyncio_patch("gns3server.modules.iou.IOU.delete_vm", return_value=True) as mock:
- response = server.delete("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.delete("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
@@ -141,7 +141,7 @@ def test_iou_update(server, vm, tmpdir, free_console_port, project):
"l1_keepalives": True,
"initial_config_content": "hostname test"
}
- response = server.put("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params)
+ response = server.put("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True)
assert response.status == 200
assert response.json["name"] == "test"
assert response.json["console"] == free_console_port
diff --git a/tests/handlers/api/test_project.py b/tests/handlers/api/test_project.py
index b633a57c..a82834a0 100644
--- a/tests/handlers/api/test_project.py
+++ b/tests/handlers/api/test_project.py
@@ -33,7 +33,7 @@ def test_create_project_with_path(server, tmpdir):
def test_create_project_without_dir(server):
query = {}
- response = server.post("/projects", query)
+ response = server.post("/projects", query, example=True)
assert response.status == 200
assert response.json["project_id"] is not None
assert response.json["temporary"] is False
diff --git a/tests/handlers/api/test_qemu.py b/tests/handlers/api/test_qemu.py
index f0fe64d0..b32cd945 100644
--- a/tests/handlers/api/test_qemu.py
+++ b/tests/handlers/api/test_qemu.py
@@ -77,42 +77,42 @@ def test_qemu_get(server, project, vm):
def test_qemu_start(server, vm):
with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.start", return_value=True) as mock:
- response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_qemu_stop(server, vm):
with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.stop", return_value=True) as mock:
- response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_qemu_reload(server, vm):
with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.reload", return_value=True) as mock:
- response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_qemu_suspend(server, vm):
with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.suspend", return_value=True) as mock:
- response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_qemu_resume(server, vm):
with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.resume", return_value=True) as mock:
- response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_qemu_delete(server, vm):
with asyncio_patch("gns3server.modules.qemu.Qemu.delete_vm", return_value=True) as mock:
- response = server.delete("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.delete("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
@@ -124,7 +124,7 @@ def test_qemu_update(server, vm, tmpdir, free_console_port, project):
"ram": 1024,
"hdb_disk_image": "hdb"
}
- response = server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params)
+ response = server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True)
assert response.status == 200
assert response.json["name"] == "test"
assert response.json["console"] == free_console_port
@@ -168,7 +168,7 @@ def test_qemu_list_binaries(server, vm):
ret = [{"path": "/tmp/1", "version": "2.2.0"},
{"path": "/tmp/2", "version": "2.1.0"}]
with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock:
- response = server.get("/qemu/binaries".format(project_id=vm["project_id"]))
+ response = server.get("/qemu/binaries".format(project_id=vm["project_id"]), example=True)
assert mock.called
assert response.status == 200
assert response.json == ret
diff --git a/tests/handlers/api/test_virtualbox.py b/tests/handlers/api/test_virtualbox.py
index c195b459..16825d1b 100644
--- a/tests/handlers/api/test_virtualbox.py
+++ b/tests/handlers/api/test_virtualbox.py
@@ -57,35 +57,35 @@ def test_vbox_get(server, project, vm):
def test_vbox_start(server, vm):
with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.start", return_value=True) as mock:
- response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vbox_stop(server, vm):
with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.stop", return_value=True) as mock:
- response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vbox_suspend(server, vm):
with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.suspend", return_value=True) as mock:
- response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vbox_resume(server, vm):
with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.resume", return_value=True) as mock:
- response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vbox_reload(server, vm):
with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.reload", return_value=True) as mock:
- response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
@@ -124,7 +124,8 @@ def test_vbox_delete_nio(server, vm):
def test_vbox_update(server, vm, free_console_port):
response = server.put("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test",
- "console": free_console_port})
+ "console": free_console_port},
+ example=True)
assert response.status == 200
assert response.json["name"] == "test"
assert response.json["console"] == free_console_port
diff --git a/tests/handlers/api/test_vpcs.py b/tests/handlers/api/test_vpcs.py
index 009da325..e0a4acca 100644
--- a/tests/handlers/api/test_vpcs.py
+++ b/tests/handlers/api/test_vpcs.py
@@ -94,28 +94,28 @@ def test_vpcs_delete_nio(server, vm):
def test_vpcs_start(server, vm):
with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.start", return_value=True) as mock:
- response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vpcs_stop(server, vm):
with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.stop", return_value=True) as mock:
- response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vpcs_reload(server, vm):
with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.reload", return_value=True) as mock:
- response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
def test_vpcs_delete(server, vm):
with asyncio_patch("gns3server.modules.vpcs.VPCS.delete_vm", return_value=True) as mock:
- response = server.delete("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]))
+ response = server.delete("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True)
assert mock.called
assert response.status == 204
@@ -123,7 +123,8 @@ def test_vpcs_delete(server, vm):
def test_vpcs_update(server, vm, tmpdir, free_console_port):
response = server.put("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test",
"console": free_console_port,
- "startup_script": "ip 192.168.1.1"})
+ "startup_script": "ip 192.168.1.1"},
+ example=True)
assert response.status == 200
assert response.json["name"] == "test"
assert response.json["console"] == free_console_port
diff --git a/tests/web/test_documentation.py b/tests/web/test_documentation.py
new file mode 100644
index 00000000..111d24aa
--- /dev/null
+++ b/tests/web/test_documentation.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2015 GNS3 Technologies Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+import os
+
+from gns3server.web.documentation import Documentation
+from gns3server.handlers import *
+from gns3server.web.route import Route
+
+
+def test_documentation_write(tmpdir):
+ os.makedirs(str(tmpdir / "api/examples"))
+ with open(str(tmpdir / "api/examples/post_projectsprojectidvirtualboxvms.txt"), "w+") as f:
+ f.write("curl test")
+
+ Documentation(Route, str(tmpdir)).write()
+
+ assert os.path.exists(str(tmpdir / "api"))
+ assert os.path.exists(str(tmpdir / "api" / "v1"))
+ assert os.path.exists(str(tmpdir / "api" / "v1" / "virtualbox.rst"))
+ assert os.path.exists(str(tmpdir / "api" / "v1" / "virtualbox"))
+ assert os.path.exists(str(tmpdir / "api" / "v1" / "virtualbox" / "virtualboxvms.rst"))
+ with open(str(tmpdir / "api" / "v1" / "virtualbox" / "projectsprojectidvirtualboxvms.rst")) as f:
+ content = f.read()
+ assert "Sample session" in content
+ assert "literalinclude:: ../../examples/post_projectsprojectidvirtualboxvms.txt" in content