mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Documentation
This commit is contained in:
135 files changed
+623
-295
No files matched your search
@@ -0,0 +1,8 @@
|
||||
Gns3server.handlers.index
|
||||
-----------------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
gns3server.handlers.index/*
|
||||
+4
-5
@@ -1,14 +1,13 @@
|
||||
/v2/controller/servers/shutdown
|
||||
/
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/servers/shutdown
|
||||
GET /
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Shutdown the local server
|
||||
Home page for GNS3Server
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Server is shutting down
|
||||
- **403**: Server shutdown refused
|
||||
- **200**: OK
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/status
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /status
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ressources used by GNS3Server
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: OK
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/v1/version
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Old API
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: OK
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Hypervisor
|
||||
-----------------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
hypervisor/*
|
||||
+8
-14
@@ -1,15 +1,15 @@
|
||||
/v2/controller/servers
|
||||
/v2/controller/hypervisors
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/servers
|
||||
POST /v2/controller/hypervisors
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Register a server
|
||||
Register a hypervisor
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Server added
|
||||
- **201**: Hypervisor added
|
||||
|
||||
Input
|
||||
*******
|
||||
@@ -18,10 +18,10 @@ Input
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>host</td> <td>✔</td> <td>string</td> <td>Server host</td> </tr>
|
||||
<tr><td>hypervisor_id</td> <td>✔</td> <td>string</td> <td>Server identifier</td> </tr>
|
||||
<tr><td>password</td> <td> </td> <td>string</td> <td>Password for auth</td> </tr>
|
||||
<tr><td>port</td> <td>✔</td> <td>integer</td> <td>Server port</td> </tr>
|
||||
<tr><td>protocol</td> <td>✔</td> <td>enum</td> <td>Possible values: http, https</td> </tr>
|
||||
<tr><td>server_id</td> <td>✔</td> <td>string</td> <td>Server identifier</td> </tr>
|
||||
<tr><td>user</td> <td> </td> <td>string</td> <td>User for auth</td> </tr>
|
||||
</table>
|
||||
|
||||
@@ -31,18 +31,12 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>connected</td> <td> </td> <td>boolean</td> <td>True if controller is connected to the server</td> </tr>
|
||||
<tr><td>connected</td> <td> </td> <td>boolean</td> <td>True if controller is connected to the hypervisor</td> </tr>
|
||||
<tr><td>host</td> <td>✔</td> <td>string</td> <td>Server host</td> </tr>
|
||||
<tr><td>hypervisor_id</td> <td>✔</td> <td>string</td> <td>Server identifier</td> </tr>
|
||||
<tr><td>port</td> <td>✔</td> <td>integer</td> <td>Server port</td> </tr>
|
||||
<tr><td>protocol</td> <td>✔</td> <td>enum</td> <td>Possible values: http, https</td> </tr>
|
||||
<tr><td>server_id</td> <td>✔</td> <td>string</td> <td>Server identifier</td> </tr>
|
||||
<tr><td>user</td> <td> </td> <td>string</td> <td>User for auth</td> </tr>
|
||||
<tr><td>version</td> <td> </td> <td>['string', 'null']</td> <td>Version of the GNS3 remote server</td> </tr>
|
||||
<tr><td>version</td> <td> </td> <td>['string', 'null']</td> <td>Version of the GNS3 remote hypervisor</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_servers.txt
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/v2/controller/hypervisors/shutdown
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/hypervisors/shutdown
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Shutdown the local hypervisor
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Hypervisor is shutting down
|
||||
- **403**: Hypervisor shutdown refused
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Project
|
||||
-----------------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
project/*
|
||||
@@ -0,0 +1,44 @@
|
||||
/v2/controller/projects
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/projects
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new project on the server
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Project created
|
||||
- **409**: Project already created
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
|
||||
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</td> </tr>
|
||||
<tr><td>project_id</td> <td> </td> <td>['string', 'null']</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
|
||||
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projects.txt
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/v2/controller/projects/{project_id}
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
DELETE /v2/controller/projects/**{project_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a project from disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: The project doesn't exist
|
||||
- **204**: Changes have been written on disk
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_delete_projectsprojectid.txt
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/v2/controller/projects/{project_id}/close
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/projects/**{project_id}**/close
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Close a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: The project doesn't exist
|
||||
- **204**: The project has been closed
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidclose.txt
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/v2/controller/projects/{project_id}/commit
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/projects/**{project_id}**/commit
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Write changes on disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: The UUID of the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: The project doesn't exist
|
||||
- **204**: Changes have been written on disk
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidcommit.txt
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Server
|
||||
Vm
|
||||
-----------------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
server/*
|
||||
vm/*
|
||||
@@ -0,0 +1,56 @@
|
||||
/v2/controller/projects/{project_id}/vms
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/controller/projects/**{project_id}**/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>['integer', 'null']</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td> </td> <td>enum</td> <td>Possible values: serial, vnc, telnet</td> </tr>
|
||||
<tr><td>hypervisor_id</td> <td>✔</td> <td>string</td> <td>Hypervisor identifier</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VM name</td> </tr>
|
||||
<tr><td>project_id</td> <td> </td> <td>string</td> <td>Project identifier</td> </tr>
|
||||
<tr><td>properties</td> <td> </td> <td>object</td> <td>Properties specific to an emulator</td> </tr>
|
||||
<tr><td>vm_id</td> <td> </td> <td>string</td> <td>VM identifier</td> </tr>
|
||||
<tr><td>vm_type</td> <td>✔</td> <td>enum</td> <td>Possible values: docker, dynamips, vpcs, virtualbox, vmware, iou</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>['integer', 'null']</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td> </td> <td>enum</td> <td>Possible values: serial, vnc, telnet</td> </tr>
|
||||
<tr><td>hypervisor_id</td> <td>✔</td> <td>string</td> <td>Hypervisor identifier</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VM name</td> </tr>
|
||||
<tr><td>project_id</td> <td> </td> <td>string</td> <td>Project identifier</td> </tr>
|
||||
<tr><td>properties</td> <td> </td> <td>object</td> <td>Properties specific to an emulator</td> </tr>
|
||||
<tr><td>vm_id</td> <td> </td> <td>string</td> <td>VM identifier</td> </tr>
|
||||
<tr><td>vm_type</td> <td>✔</td> <td>enum</td> <td>Possible values: docker, dynamips, vpcs, virtualbox, vmware, iou</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidvms.txt
|
||||
|
||||
Reference in new issue
Block a user