gns3-server/docs/api/examples/controller_post_hypervisors.txt

31 lines
772 B
Plaintext
Raw Normal View History

2016-03-11 16:21:21 +02:00
curl -i -X POST 'http://localhost:8000/v2/hypervisors' -d '{"host": "example.com", "hypervisor_id": "my_hypervisor_id", "password": "secure", "port": 84, "protocol": "http", "user": "julien"}'
2016-03-04 18:50:17 +02:00
2016-03-11 16:21:21 +02:00
POST /v2/hypervisors HTTP/1.1
2016-03-04 18:50:17 +02:00
{
"host": "example.com",
2016-03-11 16:21:21 +02:00
"hypervisor_id": "my_hypervisor_id",
2016-03-04 18:50:17 +02:00
"password": "secure",
"port": 84,
"protocol": "http",
"user": "julien"
}
HTTP/1.1 201
ACCESS-CONTROL-ALLOW-ORIGIN: *
2016-03-11 16:21:21 +02:00
CONTENT-LENGTH: 184
2016-03-04 18:50:17 +02:00
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/1.5.0dev1
2016-03-11 16:21:21 +02:00
X-ROUTE: /v2/controller/hypervisors
2016-03-04 18:50:17 +02:00
{
"connected": false,
"host": "example.com",
2016-03-11 16:21:21 +02:00
"hypervisor_id": "my_hypervisor_id",
2016-03-04 18:50:17 +02:00
"port": 84,
"protocol": "http",
"user": "julien",
"version": "1.5.0dev1"
}