1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00
gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt
Julien Duponchelle 97aea5f82a
Doc update
2016-04-18 16:58:06 +02:00

43 lines
1.2 KiB
Plaintext

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"}]}'
POST /v2/projects/51200341-1056-4d3b-9d20-51c24269ddbc/links HTTP/1.1
{
"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"
}
]
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
CONTENT-LENGTH: 364
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/2.0.0dev1
X-ROUTE: /v2/projects/{project_id}/links
{
"link_id": "7428a49b-5dd3-4f62-841c-6c84410cea43",
"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"
}
]
}