gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt

43 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-04-18 14:49:36 +00:00
curl -i -X POST 'http://localhost:3080/v2/projects/6693d45f-ea1b-4b25-878c-333b179cb7dc/links' -d '{"vms": [{"adapter_number": 0, "port_number": 3, "vm_id": "0f1f5a24-4f91-4779-b6ce-3e0f4754fef0"}, {"adapter_number": 2, "port_number": 4, "vm_id": "28701ffc-e393-46a0-981f-eb4d67611fde"}]}'
2016-03-11 16:20:09 +00:00
2016-04-18 14:49:36 +00:00
POST /v2/projects/6693d45f-ea1b-4b25-878c-333b179cb7dc/links HTTP/1.1
2016-03-11 16:20:09 +00:00
{
"vms": [
{
"adapter_number": 0,
"port_number": 3,
2016-04-18 14:49:36 +00:00
"vm_id": "0f1f5a24-4f91-4779-b6ce-3e0f4754fef0"
2016-03-11 16:20:09 +00:00
},
{
"adapter_number": 2,
"port_number": 4,
2016-04-18 14:49:36 +00:00
"vm_id": "28701ffc-e393-46a0-981f-eb4d67611fde"
2016-03-11 16:20:09 +00:00
}
]
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
CONTENT-LENGTH: 364
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
2016-04-18 14:49:36 +00:00
SERVER: Python/3.5 GNS3/2.0.0dev1
2016-03-11 16:20:09 +00:00
X-ROUTE: /v2/projects/{project_id}/links
{
2016-04-18 14:49:36 +00:00
"link_id": "e662f691-6ac5-4833-876a-e4eb83157b9e",
2016-03-11 16:20:09 +00:00
"vms": [
{
"adapter_number": 0,
"port_number": 3,
2016-04-18 14:49:36 +00:00
"vm_id": "0f1f5a24-4f91-4779-b6ce-3e0f4754fef0"
2016-03-11 16:20:09 +00:00
},
{
"adapter_number": 2,
"port_number": 4,
2016-04-18 14:49:36 +00:00
"vm_id": "28701ffc-e393-46a0-981f-eb4d67611fde"
2016-03-11 16:20:09 +00:00
}
]
}