1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 16:58:28 +00:00
gns3-server/scripts/docs/api/examples/controller_post_projectsprojectidlinks.txt

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-11-21 07:12:38 +00:00
curl -i -X POST 'http://localhost:3080/v2/projects/30e3961f-945e-4985-bbd5-0d50f8be8f19/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "979a29e3-992f-4a36-a440-06958ca9aa5b", "port_number": 3}, {"adapter_number": 0, "node_id": "979a29e3-992f-4a36-a440-06958ca9aa5b", "port_number": 4}]}'
POST /v2/projects/30e3961f-945e-4985-bbd5-0d50f8be8f19/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Text",
"x": 42,
"y": 0
},
"node_id": "979a29e3-992f-4a36-a440-06958ca9aa5b",
"port_number": 3
},
{
"adapter_number": 0,
"node_id": "979a29e3-992f-4a36-a440-06958ca9aa5b",
"port_number": 4
}
]
}
HTTP/1.1 409
Connection: close
Content-Length: 64
Content-Type: application/json
Date: Mon, 19 Nov 2018 18:34:04 GMT
Server: Python/3.6 GNS3/2.2.0dev4
X-Route: /v2/projects/{project_id}/links
{
"message": "Cannot connect to itself",
"status": 409
}