/v1/version¶
Contents
GET /v1/version¶
Retrieve the server version number
Response status codes¶
- 200: OK
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
local | boolean | Either this is a local server | |
version | ✔ | string | Version number human readable |
Sample session¶
curl -i -X GET 'http://localhost:8000/v1/version'
GET /v1/version HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 49
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/version
{
"local": true,
"version": "1.3.1.rc2"
}
POST /v1/version¶
Check if version is the same as the server
Response status codes¶
- 200: Same version
- 409: Invalid version
Input¶
Name | Mandatory | Type | Description |
---|---|---|---|
local | boolean | Either this is a local server | |
version | ✔ | string | Version number human readable |
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
local | boolean | Either this is a local server | |
version | ✔ | string | Version number human readable |
Sample session¶
curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.3.1.rc2"}'
POST /v1/version HTTP/1.1
{
"version": "1.3.1.rc2"
}
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 30
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/version
{
"version": "1.3.1.rc2"
}