gns3-server/docs/api/examples/controller_put_projectsprojectidlinkslinkid.txt
2018-06-07 10:26:06 +02:00

82 lines
2.3 KiB
Plaintext

curl -i -X PUT 'http://localhost:3080/v2/projects/42d57b87-6ba4-4693-95c5-815064a1e587/links/b3bb9cf1-9947-48aa-9a81-4531bf575943' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "a093ca63-8a69-4ee5-bf36-fb9ea1e586d4", "port_number": 3}, {"adapter_number": 2, "node_id": "dfda5907-1939-4dbb-a36f-660ef2c9e2cb", "port_number": 4}]}'
PUT /v2/projects/42d57b87-6ba4-4693-95c5-815064a1e587/links/b3bb9cf1-9947-48aa-9a81-4531bf575943 HTTP/1.1
{
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "a093ca63-8a69-4ee5-bf36-fb9ea1e586d4",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "dfda5907-1939-4dbb-a36f-660ef2c9e2cb",
"port_number": 4
}
]
}
HTTP/1.1 201
Connection: close
Content-Length: 1022
Content-Type: application/json
Date: Thu, 07 Jun 2018 08:13:55 GMT
Server: Python/3.6 GNS3/2.1.7dev1
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": "b3bb9cf1-9947-48aa-9a81-4531bf575943",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "a093ca63-8a69-4ee5-bf36-fb9ea1e586d4",
"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": "dfda5907-1939-4dbb-a36f-660ef2c9e2cb",
"port_number": 4
}
],
"project_id": "42d57b87-6ba4-4693-95c5-815064a1e587",
"suspend": false
}