mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
curl -i -X POST 'http://localhost:3080/v2/projects/c9112400-8166-4eac-99dd-069ce94ed0f9/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "dacc5bd7-7738-483a-a644-cc7dc69705b3", "port_number": 3}, {"adapter_number": 2, "node_id": "b910eb40-b1b1-4b38-ab8f-61f096d54bb3", "port_number": 4}]}'
|
|
|
|
POST /v2/projects/c9112400-8166-4eac-99dd-069ce94ed0f9/links HTTP/1.1
|
|
{
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Text",
|
|
"x": 42,
|
|
"y": 0
|
|
},
|
|
"node_id": "dacc5bd7-7738-483a-a644-cc7dc69705b3",
|
|
"port_number": 3
|
|
},
|
|
{
|
|
"adapter_number": 2,
|
|
"node_id": "b910eb40-b1b1-4b38-ab8f-61f096d54bb3",
|
|
"port_number": 4
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
HTTP/1.1 201
|
|
Content-Length: 875
|
|
Content-Type: application/json
|
|
Date: Tue, 27 Sep 2016 10:01:17 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": "76b7527f-96e7-4c0d-bcc7-98003f44634b",
|
|
"link_type": "ethernet",
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Text",
|
|
"x": 42,
|
|
"y": 0
|
|
},
|
|
"node_id": "dacc5bd7-7738-483a-a644-cc7dc69705b3",
|
|
"port_number": 3
|
|
},
|
|
{
|
|
"adapter_number": 2,
|
|
"label": {
|
|
"rotation": 0,
|
|
"style": "font-size: 10; font-style: Verdana",
|
|
"text": "2/4",
|
|
"x": -10,
|
|
"y": -10
|
|
},
|
|
"node_id": "b910eb40-b1b1-4b38-ab8f-61f096d54bb3",
|
|
"port_number": 4
|
|
}
|
|
],
|
|
"project_id": "c9112400-8166-4eac-99dd-069ce94ed0f9"
|
|
}
|