2016-08-29 16:58:29 +03:00
|
|
|
curl -i -X POST 'http://localhost:3080/v2/projects/e9c95008-ff25-4da1-9aac-6e31d88e258a/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "b7ae8bfc-d980-4be2-bc43-023561293d94", "port_number": 3}, {"adapter_number": 2, "node_id": "814eae63-4d8a-4c1a-84f4-09c6b50bedce", "port_number": 4}]}'
|
2016-03-11 18:20:09 +02:00
|
|
|
|
2016-08-29 16:58:29 +03:00
|
|
|
POST /v2/projects/e9c95008-ff25-4da1-9aac-6e31d88e258a/links HTTP/1.1
|
2016-03-11 18:20:09 +02:00
|
|
|
{
|
2016-05-12 09:44:38 +03:00
|
|
|
"nodes": [
|
2016-03-11 18:20:09 +02:00
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
2016-07-11 16:37:57 +03:00
|
|
|
"label": {
|
|
|
|
"text": "Text",
|
|
|
|
"x": 42,
|
|
|
|
"y": 0
|
|
|
|
},
|
2016-08-29 16:58:29 +03:00
|
|
|
"node_id": "b7ae8bfc-d980-4be2-bc43-023561293d94",
|
2016-05-12 09:44:38 +03:00
|
|
|
"port_number": 3
|
2016-03-11 18:20:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2016-08-29 16:58:29 +03:00
|
|
|
"node_id": "814eae63-4d8a-4c1a-84f4-09c6b50bedce",
|
2016-05-12 09:44:38 +03:00
|
|
|
"port_number": 4
|
2016-03-11 18:20:09 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HTTP/1.1 201
|
2016-07-11 16:37:57 +03:00
|
|
|
CONTENT-LENGTH: 846
|
2016-03-11 18:20:09 +02:00
|
|
|
CONTENT-TYPE: application/json
|
|
|
|
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
2016-04-18 17:49:36 +03:00
|
|
|
SERVER: Python/3.5 GNS3/2.0.0dev1
|
2016-03-11 18:20:09 +02:00
|
|
|
X-ROUTE: /v2/projects/{project_id}/links
|
|
|
|
|
|
|
|
{
|
2016-05-12 09:44:38 +03:00
|
|
|
"capture_file_name": null,
|
|
|
|
"capture_file_path": null,
|
|
|
|
"capturing": false,
|
2016-08-29 16:58:29 +03:00
|
|
|
"link_id": "e3f9f2b2-bb47-4f57-948d-d7c4e92c0ff1",
|
2016-05-12 09:44:38 +03:00
|
|
|
"nodes": [
|
2016-03-11 18:20:09 +02:00
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
2016-07-11 16:37:57 +03:00
|
|
|
"label": {
|
|
|
|
"text": "Text",
|
|
|
|
"x": 42,
|
|
|
|
"y": 0
|
|
|
|
},
|
2016-08-29 16:58:29 +03:00
|
|
|
"node_id": "b7ae8bfc-d980-4be2-bc43-023561293d94",
|
2016-05-12 09:44:38 +03:00
|
|
|
"port_number": 3
|
2016-03-11 18:20:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2016-07-11 16:37:57 +03:00
|
|
|
"label": {
|
|
|
|
"rotation": 0,
|
|
|
|
"style": "font-size: 10; font-style: Verdana",
|
|
|
|
"text": "2/4",
|
|
|
|
"x": -10,
|
|
|
|
"y": -10
|
|
|
|
},
|
2016-08-29 16:58:29 +03:00
|
|
|
"node_id": "814eae63-4d8a-4c1a-84f4-09c6b50bedce",
|
2016-05-12 09:44:38 +03:00
|
|
|
"port_number": 4
|
2016-03-11 18:20:09 +02:00
|
|
|
}
|
2016-06-04 11:40:39 +03:00
|
|
|
],
|
2016-08-29 16:58:29 +03:00
|
|
|
"project_id": "e9c95008-ff25-4da1-9aac-6e31d88e258a"
|
2016-03-11 18:20:09 +02:00
|
|
|
}
|