/v1/version — GNS3 1.3.dev1 documentation

### Navigation

- index
- next |
- previous |
- GNS3 1.3.dev1 documentation »
- Version »

# /v1/version

Contents

- /v1/version
  - GET /v1/version
    - Response status codes
    - Output
    - Sample session
  - POST /v1/version
    - Response status codes
    - Input
    - Output
    - Sample session

## GET /v1/version

Retrieve the server version number

### Response status codes

- 200: OK

### Output

Name | Mandatory | Type | Description
--- | --- | --- | ---
version | ✔ | string | Version number human readable

### Sample session

    curl -i -X GET 'http://localhost:8000/version'

    GET /version HTTP/1.1

    HTTP/1.1 200
    CONNECTION: keep-alive
    CONTENT-LENGTH: 29
    CONTENT-TYPE: application/json
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /v1/version

    {
        "version": "1.3.dev1"
    }

## 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
--- | --- | --- | ---
version | ✔ | string | Version number human readable

### Output

Name | Mandatory | Type | Description
--- | --- | --- | ---
version | ✔ | string | Version number human readable

### Sample session

    curl -i -X POST 'http://localhost:8000/version' -d '{"version": "1.3.dev1"}'

    POST /version HTTP/1.1
    {
        "version": "1.3.dev1"
    }

    HTTP/1.1 200
    CONNECTION: keep-alive
    CONTENT-LENGTH: 29
    CONTENT-TYPE: application/json
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /v1/version

    {
        "version": "1.3.dev1"
    }

### Navigation

- index
- next |
- previous |
- GNS3 1.3.dev1 documentation »
- Version »