gns3-server/docs/api/examples/controller_put_projectsprojectidlinkslinkid.txt
grossmj 0f496907a0 Fix API status code for start/stop/suspend/reload a node. Fixes #1353.
Fix issues with test.
Update documentation.
2018-06-14 16:39:32 +08:00

82 lines
2.3 KiB
Plaintext

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}]}'
PUT /v2/projects/3f20f6cd-0674-41da-9ed9-36fbf90b87d5/links/8382d2ec-103b-4255-8073-d6754b2f72fc HTTP/1.1
{
"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
}
]
}
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
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",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "52e2c403-926e-470e-b27c-ae29c659ad72",
"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",
"port_number": 4
}
],
"project_id": "3f20f6cd-0674-41da-9ed9-36fbf90b87d5",
"suspend": false
}