1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 19:28:07 +00:00
gns3-server/docs/api/examples/controller_post_projectsprojectidvms.txt

38 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-03-11 14:21:21 +00:00
curl -i -X POST 'http://localhost:8000/v2/projects/4eed4d28-791f-46c1-8177-6ae1c0450a20/vms' -d '{"hypervisor_id": "example.com", "name": "test", "properties": {"startup_script": "echo test"}, "vm_type": "vpcs"}'
POST /v2/projects/4eed4d28-791f-46c1-8177-6ae1c0450a20/vms HTTP/1.1
{
"hypervisor_id": "example.com",
"name": "test",
"properties": {
"startup_script": "echo test"
},
"vm_type": "vpcs"
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
CONTENT-LENGTH: 448
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/1.5.0dev1
X-ROUTE: /v2/controller/projects/{project_id}/vms
{
"console": null,
"console_type": "telnet",
"hypervisor_id": "example.com",
"name": "test",
"project_id": "4eed4d28-791f-46c1-8177-6ae1c0450a20",
"properties": {
"console": null,
"console_type": "telnet",
"name": "test",
"startup_script": "echo test",
"vm_id": "ca8bd33c-fd32-4252-90f6-47b4a2b5a115"
},
"vm_id": "ca8bd33c-fd32-4252-90f6-47b4a2b5a115",
"vm_type": "vpcs"
}