You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gns3-server/docs/api/examples/controller_post_projectspro...

63 lines
1.8 KiB

curl -i -X POST 'http://localhost:3080/v2/projects/89e290ee-3f68-4c3c-914d-2346298c653a/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "ca180310-9f4a-4a26-b0a7-e306dee99bf1", "port_number": 3}, {"adapter_number": 2, "node_id": "32376395-9f93-446a-8792-921b607b3d90", "port_number": 4}]}'
POST /v2/projects/89e290ee-3f68-4c3c-914d-2346298c653a/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Text",
"x": 42,
"y": 0
},
"node_id": "ca180310-9f4a-4a26-b0a7-e306dee99bf1",
"port_number": 3
},
{
"adapter_number": 2,
"node_id": "32376395-9f93-446a-8792-921b607b3d90",
"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": "ebeaf698-0187-45c8-9db0-f467a7b324be",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Text",
"x": 42,
"y": 0
},
"node_id": "ca180310-9f4a-4a26-b0a7-e306dee99bf1",
"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": "32376395-9f93-446a-8792-921b607b3d90",
"port_number": 4
}
],
"project_id": "89e290ee-3f68-4c3c-914d-2346298c653a"
}