2016-09-14 13:24:27 +00:00
|
|
|
curl -i -X POST 'http://localhost:3080/v2/projects/ad130b0e-f215-4e9a-8139-4976617ef8b2/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "2d755c11-aa1f-412d-b5e3-6cbaee998928", "port_number": 3}, {"adapter_number": 2, "node_id": "8c7e73c0-918e-4442-9cb8-41f5d847a92b", "port_number": 4}]}'
|
2016-03-11 16:20:09 +00:00
|
|
|
|
2016-09-14 13:24:27 +00:00
|
|
|
POST /v2/projects/ad130b0e-f215-4e9a-8139-4976617ef8b2/links HTTP/1.1
|
2016-03-11 16:20:09 +00:00
|
|
|
{
|
2016-05-12 06:44:38 +00:00
|
|
|
"nodes": [
|
2016-03-11 16:20:09 +00:00
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
2016-07-11 13:37:57 +00:00
|
|
|
"label": {
|
|
|
|
"text": "Text",
|
|
|
|
"x": 42,
|
|
|
|
"y": 0
|
|
|
|
},
|
2016-09-14 13:24:27 +00:00
|
|
|
"node_id": "2d755c11-aa1f-412d-b5e3-6cbaee998928",
|
2016-05-12 06:44:38 +00:00
|
|
|
"port_number": 3
|
2016-03-11 16:20:09 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2016-09-14 13:24:27 +00:00
|
|
|
"node_id": "8c7e73c0-918e-4442-9cb8-41f5d847a92b",
|
2016-05-12 06:44:38 +00:00
|
|
|
"port_number": 4
|
2016-03-11 16:20:09 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HTTP/1.1 201
|
2016-07-11 13:37:57 +00:00
|
|
|
CONTENT-LENGTH: 846
|
2016-03-11 16:20:09 +00:00
|
|
|
CONTENT-TYPE: application/json
|
|
|
|
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
2016-04-18 14:49:36 +00:00
|
|
|
SERVER: Python/3.5 GNS3/2.0.0dev1
|
2016-03-11 16:20:09 +00:00
|
|
|
X-ROUTE: /v2/projects/{project_id}/links
|
|
|
|
|
|
|
|
{
|
2016-05-12 06:44:38 +00:00
|
|
|
"capture_file_name": null,
|
|
|
|
"capture_file_path": null,
|
|
|
|
"capturing": false,
|
2016-09-14 13:24:27 +00:00
|
|
|
"link_id": "c3a00a39-4520-4663-8628-8bea7fdb5825",
|
2016-05-12 06:44:38 +00:00
|
|
|
"nodes": [
|
2016-03-11 16:20:09 +00:00
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
2016-07-11 13:37:57 +00:00
|
|
|
"label": {
|
|
|
|
"text": "Text",
|
|
|
|
"x": 42,
|
|
|
|
"y": 0
|
|
|
|
},
|
2016-09-14 13:24:27 +00:00
|
|
|
"node_id": "2d755c11-aa1f-412d-b5e3-6cbaee998928",
|
2016-05-12 06:44:38 +00:00
|
|
|
"port_number": 3
|
2016-03-11 16:20:09 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2016-07-11 13:37:57 +00:00
|
|
|
"label": {
|
|
|
|
"rotation": 0,
|
|
|
|
"style": "font-size: 10; font-style: Verdana",
|
|
|
|
"text": "2/4",
|
|
|
|
"x": -10,
|
|
|
|
"y": -10
|
|
|
|
},
|
2016-09-14 13:24:27 +00:00
|
|
|
"node_id": "8c7e73c0-918e-4442-9cb8-41f5d847a92b",
|
2016-05-12 06:44:38 +00:00
|
|
|
"port_number": 4
|
2016-03-11 16:20:09 +00:00
|
|
|
}
|
2016-06-04 08:40:39 +00:00
|
|
|
],
|
2016-09-14 13:24:27 +00:00
|
|
|
"project_id": "ad130b0e-f215-4e9a-8139-4976617ef8b2"
|
2016-03-11 16:20:09 +00:00
|
|
|
}
|