1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-28 09:48:08 +00:00
gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt
Julien Duponchelle ed291da566
Rebuild doc
2016-03-14 20:37:07 +01:00

43 lines
1.2 KiB
Plaintext

curl -i -X POST 'http://localhost:8000/v2/projects/b61e91b1-e69c-4eaa-a012-9d98135a53e0/links' -d '{"vms": [{"adapter_number": 0, "port_number": 3, "vm_id": "0f349889-091d-4919-87d2-11d7ec429066"}, {"adapter_number": 2, "port_number": 4, "vm_id": "bc556663-16a6-41e0-9562-4e541037d890"}]}'
POST /v2/projects/b61e91b1-e69c-4eaa-a012-9d98135a53e0/links HTTP/1.1
{
"vms": [
{
"adapter_number": 0,
"port_number": 3,
"vm_id": "0f349889-091d-4919-87d2-11d7ec429066"
},
{
"adapter_number": 2,
"port_number": 4,
"vm_id": "bc556663-16a6-41e0-9562-4e541037d890"
}
]
}
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/1.5.0dev1
X-ROUTE: /v2/projects/{project_id}/links
{
"link_id": "43bd7b6b-8878-48fd-b8f7-1ca876b372ae",
"vms": [
{
"adapter_number": 0,
"port_number": 3,
"vm_id": "0f349889-091d-4919-87d2-11d7ec429066"
},
{
"adapter_number": 2,
"port_number": 4,
"vm_id": "bc556663-16a6-41e0-9562-4e541037d890"
}
]
}