gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt
2016-06-21 10:31:00 +02:00

46 lines
1.3 KiB
Plaintext

curl -i -X POST 'http://localhost:3080/v2/projects/54a38caf-74a3-40c5-a9e0-2cf1a414ffaf/links' -d '{"nodes": [{"adapter_number": 0, "node_id": "8115e155-24c3-4f1e-99f6-9245aca009a2", "port_number": 3}, {"adapter_number": 2, "node_id": "38e67c08-724a-4aa6-b672-9d621c4727c7", "port_number": 4}]}'
POST /v2/projects/54a38caf-74a3-40c5-a9e0-2cf1a414ffaf/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"node_id": "8115e155-24c3-4f1e-99f6-9245aca009a2",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "38e67c08-724a-4aa6-b672-9d621c4727c7",
"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": "7af8ebf6-6300-4896-9c01-bb0f6e857c0a",
"nodes": [
{
"adapter_number": 0,
"node_id": "8115e155-24c3-4f1e-99f6-9245aca009a2",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "38e67c08-724a-4aa6-b672-9d621c4727c7",
"port_number": 4
}
],
"project_id": "54a38caf-74a3-40c5-a9e0-2cf1a414ffaf"
}