gns3-server/docs/api/examples/controller_post_projectsprojectiddrawings.txt
2016-09-27 17:15:40 +02:00

28 lines
1.0 KiB
Plaintext

curl -i -X POST 'http://localhost:3080/v2/projects/f52f1e26-848d-4d38-aed9-d4d6fadd8409/drawings' -d '{"svg": "<svg height=\"210\" width=\"500\"><line x1=\"0\" y1=\"0\" x2=\"200\" y2=\"200\" style=\"stroke:rgb(255,0,0);stroke-width:2\" /></svg>", "x": 10, "y": 20, "z": 0}'
POST /v2/projects/f52f1e26-848d-4d38-aed9-d4d6fadd8409/drawings HTTP/1.1
{
"svg": "<svg height=\"210\" width=\"500\"><line x1=\"0\" y1=\"0\" x2=\"200\" y2=\"200\" style=\"stroke:rgb(255,0,0);stroke-width:2\" /></svg>",
"x": 10,
"y": 20,
"z": 0
}
HTTP/1.1 201
Content-Length: 323
Content-Type: application/json
Date: Tue, 27 Sep 2016 10:01:16 GMT
Server: Python/3.5 GNS3/2.0.0dev1
X-Route: /v2/projects/{project_id}/drawings
{
"drawing_id": "97324da2-fa1d-4b03-89ed-96c300f70c02",
"project_id": "f52f1e26-848d-4d38-aed9-d4d6fadd8409",
"rotation": 0,
"svg": "<svg height=\"210\" width=\"500\"><line x1=\"0\" y1=\"0\" x2=\"200\" y2=\"200\" style=\"stroke:rgb(255,0,0);stroke-width:2\" /></svg>",
"x": 10,
"y": 20,
"z": 0
}