mirror of https://github.com/GNS3/gns3-server
parent
b0fb2fcc6d
commit
fb79543342
@ -0,0 +1,19 @@
|
||||
curl -i -X GET 'http://localhost:8000/v1/iou/vms'
|
||||
|
||||
GET /v1/iou/vms HTTP/1.1
|
||||
|
||||
|
||||
|
||||
HTTP/1.1 200
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 45
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/iou/vms
|
||||
|
||||
[
|
||||
{
|
||||
"filename": "iou.bin"
|
||||
}
|
||||
]
|
@ -0,0 +1,24 @@
|
||||
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/files'
|
||||
|
||||
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/files HTTP/1.1
|
||||
|
||||
|
||||
|
||||
HTTP/1.1 200
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 204
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/files
|
||||
|
||||
[
|
||||
{
|
||||
"md5sum": "ad0234829205b9033196ba818f7a872b",
|
||||
"path": "test.txt"
|
||||
},
|
||||
{
|
||||
"md5sum": "098f6bcd4621d373cade4e832627b4f6",
|
||||
"path": "vm-1/dynamips/test.bin"
|
||||
}
|
||||
]
|
@ -0,0 +1,17 @@
|
||||
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/053713a7-614a-488f-be8c-572f434d991b/configs'
|
||||
|
||||
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/053713a7-614a-488f-be8c-572f434d991b/configs HTTP/1.1
|
||||
|
||||
|
||||
|
||||
HTTP/1.1 200
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 40
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/configs
|
||||
|
||||
{
|
||||
"startup_config_content": "TEST"
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/733d8688-05fd-4e25-86fb-9ce302264936/initial_config'
|
||||
|
||||
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/733d8688-05fd-4e25-86fb-9ce302264936/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.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/initial_config
|
||||
|
||||
{
|
||||
"content": "TEST"
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/5fff6292-2ac7-4f25-9fa7-5bdaaa7fbe84/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0f0f340a-7d25-4020-96f8-5d615437d173/adapters/1/ports/0/nio' -d '{"ethernet_device": "lo0", "type": "nio_generic_ethernet"}'
|
||||
|
||||
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/5fff6292-2ac7-4f25-9fa7-5bdaaa7fbe84/adapters/1/ports/0/nio HTTP/1.1
|
||||
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0f0f340a-7d25-4020-96f8-5d615437d173/adapters/1/ports/0/nio HTTP/1.1
|
||||
{
|
||||
"ethernet_device": "eth0",
|
||||
"ethernet_device": "lo0",
|
||||
"type": "nio_generic_ethernet"
|
||||
}
|
||||
|
||||
|
||||
HTTP/1.1 201
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 69
|
||||
CONTENT-LENGTH: 68
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
|
||||
|
||||
{
|
||||
"ethernet_device": "eth0",
|
||||
"ethernet_device": "lo0",
|
||||
"type": "nio_generic_ethernet"
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/dynamips/vms/{filename}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/dynamips/vms/**{filename}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Upload Dynamips image.
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Image uploaded
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/iou/vms/{filename}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/iou/vms/**{filename}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Upload IOU image.
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Image uploaded
|
||||
|
@ -0,0 +1,15 @@
|
||||
/v1/projects/{project_id}/iou/vms/{vm_id}/configs/save
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/configs/save
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Save the startup and private configs content
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Configs saved
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
@ -0,0 +1,24 @@
|
||||
/v1/projects/{project_id}/files
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/projects/**{project_id}**/files
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
List files of a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Return list of files
|
||||
- **404**: The project doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../examples/get_projectsprojectidfiles.txt
|
||||
|
@ -0,0 +1,19 @@
|
||||
/v1/projects/{project_id}/files/{path:.+}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/projects/**{project_id}**/files/**{path:.+}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get a file of a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Return the file
|
||||
- **403**: Permission denied
|
||||
- **404**: The file doesn't exist
|
||||
|
@ -0,0 +1,18 @@
|
||||
/v1/projects/{project_id}/notifications
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/projects/**{project_id}**/notifications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Receive notifications about the projects
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: End of stream
|
||||
- **404**: The project doesn't exist
|
||||
|
@ -0,0 +1,15 @@
|
||||
/v1/qemu/img-binaries
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/qemu/img-binaries
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get a list of available Qemu-img binaries
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Success
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/qemu/vms/{filename}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/qemu/vms/**{filename}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Upload Qemu image.
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Image uploaded
|
||||
|
@ -0,0 +1,40 @@
|
||||
/v1/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Add a NIO to a VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vm_id**: UUID for the instance
|
||||
- **project_id**: UUID for the project
|
||||
- **adapter_number**: Adapter where the nio should be added
|
||||
- **port_number**: Port on the adapter (always 0)
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO created
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
|
||||
DELETE /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remove a NIO from a VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vm_id**: UUID for the instance
|
||||
- **project_id**: UUID for the project
|
||||
- **adapter_number**: Adapter from where the nio should be removed
|
||||
- **port_number**: Port on the adapter (always 0)
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: NIO deleted
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/vmware/vms
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/vmware/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get all VMware VMs available
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Success
|
||||
|
Loading…
Reference in new issue