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

43 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-04-18 14:58:06 +00:00
curl -i -X POST 'http://localhost:3080/v2/projects/51200341-1056-4d3b-9d20-51c24269ddbc/links' -d '{"vms": [{"adapter_number": 0, "port_number": 3, "vm_id": "985a6c14-12af-49f3-87db-6e1a57afc78d"}, {"adapter_number": 2, "port_number": 4, "vm_id": "2393894a-afa9-4721-8412-768000fd5139"}]}'
2016-03-11 16:20:09 +00:00
2016-04-18 14:58:06 +00:00
POST /v2/projects/51200341-1056-4d3b-9d20-51c24269ddbc/links HTTP/1.1
2016-03-11 16:20:09 +00:00
{
"vms": [
{
"adapter_number": 0,
"port_number": 3,
2016-04-18 14:58:06 +00:00
"vm_id": "985a6c14-12af-49f3-87db-6e1a57afc78d"
2016-03-11 16:20:09 +00:00
},
{
"adapter_number": 2,
"port_number": 4,
2016-04-18 14:58:06 +00:00
"vm_id": "2393894a-afa9-4721-8412-768000fd5139"
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:58:06 +00:00
"link_id": "7428a49b-5dd3-4f62-841c-6c84410cea43",
2016-03-11 16:20:09 +00:00
"vms": [
{
"adapter_number": 0,
"port_number": 3,
2016-04-18 14:58:06 +00:00
"vm_id": "985a6c14-12af-49f3-87db-6e1a57afc78d"
2016-03-11 16:20:09 +00:00
},
{
"adapter_number": 2,
"port_number": 4,
2016-04-18 14:58:06 +00:00
"vm_id": "2393894a-afa9-4721-8412-768000fd5139"
2016-03-11 16:20:09 +00:00
}
]
}