mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-25 01:38:08 +00:00
63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
curl -i -X POST 'http://localhost:3080/v2/projects/586cdc63-228c-4c73-bb84-6db50bb19a2a/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "ac0eb48c-1911-46a3-94ac-52bedb77f0fc", "port_number": 3}, {"adapter_number": 2, "node_id": "fd3ca37f-4d1b-48a6-9912-d135a8b31ed9", "port_number": 4}]}'
|
|
|
|
POST /v2/projects/586cdc63-228c-4c73-bb84-6db50bb19a2a/links HTTP/1.1
|
|
{
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Text",
|
|
"x": 42,
|
|
"y": 0
|
|
},
|
|
"node_id": "ac0eb48c-1911-46a3-94ac-52bedb77f0fc",
|
|
"port_number": 3
|
|
},
|
|
{
|
|
"adapter_number": 2,
|
|
"node_id": "fd3ca37f-4d1b-48a6-9912-d135a8b31ed9",
|
|
"port_number": 4
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
HTTP/1.1 201
|
|
CONTENT-LENGTH: 846
|
|
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": "04c65f22-757f-4e07-8df0-d05913a17028",
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Text",
|
|
"x": 42,
|
|
"y": 0
|
|
},
|
|
"node_id": "ac0eb48c-1911-46a3-94ac-52bedb77f0fc",
|
|
"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": "fd3ca37f-4d1b-48a6-9912-d135a8b31ed9",
|
|
"port_number": 4
|
|
}
|
|
],
|
|
"project_id": "586cdc63-228c-4c73-bb84-6db50bb19a2a"
|
|
}
|