1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-19 14:58:07 +00:00
gns3-server/docs/api/examples/controller_post_projectsprojectidlinks.txt
2018-01-08 09:26:44 +01:00

37 lines
1.1 KiB
Plaintext

curl -i -X POST 'http://localhost:3080/v2/projects/1be6903e-2a33-456c-acac-0ce09f4bee53/links' -d '{"nodes": [{"adapter_number": 0, "label": {"text": "Text", "x": 42, "y": 0}, "node_id": "7fd37d81-3c9e-42af-a5a1-04c859278b2b", "port_number": 3}, {"adapter_number": 0, "node_id": "7fd37d81-3c9e-42af-a5a1-04c859278b2b", "port_number": 4}]}'
POST /v2/projects/1be6903e-2a33-456c-acac-0ce09f4bee53/links HTTP/1.1
{
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Text",
"x": 42,
"y": 0
},
"node_id": "7fd37d81-3c9e-42af-a5a1-04c859278b2b",
"port_number": 3
},
{
"adapter_number": 0,
"node_id": "7fd37d81-3c9e-42af-a5a1-04c859278b2b",
"port_number": 4
}
]
}
HTTP/1.1 409
Connection: close
Content-Length: 64
Content-Type: application/json
Date: Mon, 08 Jan 2018 08:16:35 GMT
Server: Python/3.6 GNS3/2.1.2dev1
X-Route: /v2/projects/{project_id}/links
{
"message": "Cannot connect to itself",
"status": 409
}