gns3-server/docs/api/examples/controller_put_projectsprojectidlinkslinkid.txt

82 lines
2.3 KiB
Plaintext
Raw Normal View History

curl -i -X PUT 'http://localhost:3080/v2/projects/c12478fd-66df-4eac-ace8-fcd9aeb15028/links/873cfd7c-e61a-41c8-ac60-1068f67d2832' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297", "port_number": 3}, {"adapter_number": 2, "node_id": "16dcbe64-5544-443b-bfed-798e6b89bd7d", "port_number": 4}]}'
2018-01-08 08:26:44 +00:00
PUT /v2/projects/c12478fd-66df-4eac-ace8-fcd9aeb15028/links/873cfd7c-e61a-41c8-ac60-1068f67d2832 HTTP/1.1
2018-01-08 08:26:44 +00:00
{
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297",
2018-01-08 08:26:44 +00:00
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "16dcbe64-5544-443b-bfed-798e6b89bd7d",
2018-01-08 08:26:44 +00:00
"port_number": 4
}
]
}
HTTP/1.1 201
Connection: close
Content-Length: 1022
Content-Type: application/json
Date: Thu, 16 Aug 2018 14:23:22 GMT
Server: Python/3.5 GNS3/2.2.0dev2
2018-01-08 08:26:44 +00:00
X-Route: /v2/projects/{project_id}/links/{link_id}
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "873cfd7c-e61a-41c8-ac60-1068f67d2832",
2018-01-08 08:26:44 +00:00
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297",
2018-01-08 08:26:44 +00:00
"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": "16dcbe64-5544-443b-bfed-798e6b89bd7d",
2018-01-08 08:26:44 +00:00
"port_number": 4
}
],
"project_id": "c12478fd-66df-4eac-ace8-fcd9aeb15028",
2018-01-08 08:26:44 +00:00
"suspend": false
}