mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Update documentation
This commit is contained in:
211 files changed
+999
-717
No files matched your search
@@ -9,8 +9,8 @@ Create a new drawing instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **drawing_id**: Drawing UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -60,8 +60,8 @@ Delete a drawing instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **drawing_id**: Drawing UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Update a link instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **link_id**: Link UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -52,8 +52,8 @@ Delete a link instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **link_id**: Link UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Steam the pcap capture file
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **link_id**: Link UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Start capture on a link instance. By default we consider it as an Ethernet link
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **link_id**: Link UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Stop capture on a link instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **link_id**: Link UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -80,8 +80,8 @@ Delete a node instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Compute the IDLE PC for a Dynamips node
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Compute a list of potential idle PC for a node
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Reload a node instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Start a node instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Stop a node instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -9,8 +9,8 @@ Suspend a node instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/v2/projects/{project_id}/duplicate
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/projects/**{project_id}**/duplicate
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Duplicate a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Project duplicate
|
||||
- **403**: The server is not the local server
|
||||
- **404**: The project doesn't exist
|
||||
|
||||
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>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>filename</td> <td> </td> <td>['string', 'null']</td> <td>Project filename</td> </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>status</td> <td> </td> <td>enum</td> <td>Possible values: opened, closed</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidduplicate.txt
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Snapshot
|
||||
-----------------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
snapshot/*
|
||||
@@ -0,0 +1,65 @@
|
||||
/v2/projects/{project_id}/snapshots
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/projects/**{project_id}**/snapshots
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create snapshot of a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Snasphot created
|
||||
- **404**: The project doesn't exist
|
||||
|
||||
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></td> <td>Snapshot name</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>created_at</td> <td>✔</td> <td>integer</td> <td>Date of the snapshot (UTC timestamp)</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>Project name</td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>snapshot_id</td> <td>✔</td> <td>string</td> <td>Snapshot UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidsnapshots.txt
|
||||
|
||||
|
||||
GET /v2/projects/**{project_id}**/snapshots
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
List snapshots of a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Snasphot list returned
|
||||
- **404**: The project doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_get_projectsprojectidsnapshots.txt
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/v2/projects/{project_id}/snapshots/{snapshot_id}
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
DELETE /v2/projects/**{project_id}**/snapshots/**{snapshot_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a snapshot from disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **snapshot_id**: Snasphot UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: The project or snapshot doesn't exist
|
||||
- **204**: Changes have been written on disk
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_delete_projectsprojectidsnapshotssnapshotid.txt
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/v2/projects/{project_id}/snapshots/{snapshot_id}/restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/projects/**{project_id}**/snapshots/**{snapshot_id}**/restore
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Restore a snapshot from disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **snapshot_id**: Snasphot UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: The snapshot has been restored
|
||||
- **404**: The project or snapshot doesn't exist
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>filename</td> <td> </td> <td>['string', 'null']</td> <td>Project filename</td> </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>status</td> <td> </td> <td>enum</td> <td>Possible values: opened, closed</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidsnapshotssnapshotidrestore.txt
|
||||
|
||||
Reference in new issue
Block a user