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

66 lines
2.7 KiB
ReStructuredText

/v2/controller/version
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v2/controller/version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the server version number
Response status codes
**********************
- **200**: OK
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/controller_get_version.txt
POST /v2/controller/version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check if version is the same as the server
Response status codes
**********************
- **200**: Same version
- **409**: Invalid version
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/controller_post_version.txt