1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00
gns3-server/docs/api/examples/controller_post_projectsprojectidvms.txt

34 lines
945 B
Plaintext
Raw Normal View History

2016-03-11 16:20:09 +00:00
curl -i -X POST 'http://localhost:8000/v2/projects/b580182b-d534-4be7-818b-6ebf47ad8df8/vms' -d '{"hypervisor_id": "example.com", "name": "test", "properties": {"startup_script": "echo test"}, "vm_type": "vpcs"}'
2016-03-11 14:21:21 +00:00
2016-03-11 16:20:09 +00:00
POST /v2/projects/b580182b-d534-4be7-818b-6ebf47ad8df8/vms HTTP/1.1
2016-03-11 14:21:21 +00:00
{
"hypervisor_id": "example.com",
"name": "test",
"properties": {
"startup_script": "echo test"
},
"vm_type": "vpcs"
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
2016-03-11 14:49:28 +00:00
CONTENT-LENGTH: 308
2016-03-11 14:21:21 +00:00
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/1.5.0dev1
X-ROUTE: /v2/projects/{project_id}/vms
2016-03-11 14:21:21 +00:00
{
"console": null,
"console_type": "telnet",
"hypervisor_id": "example.com",
"name": "test",
2016-03-11 16:20:09 +00:00
"project_id": "b580182b-d534-4be7-818b-6ebf47ad8df8",
2016-03-11 14:21:21 +00:00
"properties": {
2016-03-11 14:49:28 +00:00
"startup_script": "echo test"
2016-03-11 14:21:21 +00:00
},
2016-03-11 16:20:09 +00:00
"vm_id": "65e7c4d6-82c4-42a5-a9ee-c419637180f0",
2016-03-11 14:21:21 +00:00
"vm_type": "vpcs"
}