gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt
2016-06-23 12:29:15 +02:00

46 lines
1.3 KiB
Plaintext

curl -i -X POST 'http://localhost:3080/v2/projects/03852c0e-0fdb-4a9f-889c-662f1b4d0e57/links' -d '{"nodes": [{"adapter_number": 0, "node_id": "88adcbac-44bb-4517-be0d-ac06f2784789", "port_number": 3}, {"adapter_number": 2, "node_id": "5b3d113a-ed66-4020-8900-31b90a0e7401", "port_number": 4}]}'
POST /v2/projects/03852c0e-0fdb-4a9f-889c-662f1b4d0e57/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"node_id": "88adcbac-44bb-4517-be0d-ac06f2784789",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "5b3d113a-ed66-4020-8900-31b90a0e7401",
"port_number": 4
}
]
}
HTTP/1.1 201
CONTENT-LENGTH: 514
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": "f8c9ad16-4b0b-4808-9080-81eb106ff88c",
"nodes": [
{
"adapter_number": 0,
"node_id": "88adcbac-44bb-4517-be0d-ac06f2784789",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "5b3d113a-ed66-4020-8900-31b90a0e7401",
"port_number": 4
}
],
"project_id": "03852c0e-0fdb-4a9f-889c-662f1b4d0e57"
}