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
2016-05-12 08:44:38 +02:00

46 lines
1.3 KiB
Plaintext

curl -i -X POST 'http://localhost:3080/v2/projects/4eb295b3-8469-4774-b9b3-3da967577540/links' -d '{"nodes": [{"adapter_number": 0, "node_id": "45db581c-3a36-4d8b-960b-1a1884203e3a", "port_number": 3}, {"adapter_number": 2, "node_id": "b81f027a-aac0-4afa-8b30-73440aa5c8f1", "port_number": 4}]}'
POST /v2/projects/4eb295b3-8469-4774-b9b3-3da967577540/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"node_id": "45db581c-3a36-4d8b-960b-1a1884203e3a",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "b81f027a-aac0-4afa-8b30-73440aa5c8f1",
"port_number": 4
}
]
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
CONTENT-LENGTH: 456
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
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"link_id": "f52acf46-42ed-4a90-a780-2aa6a69a3886",
"nodes": [
{
"adapter_number": 0,
"node_id": "45db581c-3a36-4d8b-960b-1a1884203e3a",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "b81f027a-aac0-4afa-8b30-73440aa5c8f1",
"port_number": 4
}
]
}