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