1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-10-11 18:38:55 +00:00
gns3-server/docs/api/examples/controller_post_servers.txt
Julien Duponchelle b2ce7ee8d7
API V2
2016-03-07 17:57:12 +01:00

31 lines
736 B
Plaintext

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"}'
POST /v2/servers HTTP/1.1
{
"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
X-ROUTE: /v2/controller/servers
{
"connected": false,
"host": "example.com",
"port": 84,
"protocol": "http",
"server_id": "my_server_id",
"user": "julien",
"version": "1.5.0dev1"
}