1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00
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/3f20f6cd-0674-41da-9ed9-36fbf90b87d5/links/8382d2ec-103b-4255-8073-d6754b2f72fc' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "52e2c403-926e-470e-b27c-ae29c659ad72", "port_number": 3}, {"adapter_number": 2, "node_id": "7c514eac-e305-4fe3-b9d4-35db2558c172", "port_number": 4}]}'
2018-01-08 08:26:44 +00:00
PUT /v2/projects/3f20f6cd-0674-41da-9ed9-36fbf90b87d5/links/8382d2ec-103b-4255-8073-d6754b2f72fc 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": "52e2c403-926e-470e-b27c-ae29c659ad72",
2018-01-08 08:26:44 +00:00
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "7c514eac-e305-4fe3-b9d4-35db2558c172",
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, 14 Jun 2018 08:35:14 GMT
Server: Python/3.5 GNS3/2.1.8dev1
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": "8382d2ec-103b-4255-8073-d6754b2f72fc",
2018-01-08 08:26:44 +00:00
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "52e2c403-926e-470e-b27c-ae29c659ad72",
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": "7c514eac-e305-4fe3-b9d4-35db2558c172",
2018-01-08 08:26:44 +00:00
"port_number": 4
}
],
"project_id": "3f20f6cd-0674-41da-9ed9-36fbf90b87d5",
2018-01-08 08:26:44 +00:00
"suspend": false
}