mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
api endpoint implemented
This commit is contained in:
1 parent
713dbb7f45
commit
9106ac4522
7 files changed
+414
-2
No files matched your search
@@ -0,0 +1,38 @@
|
||||
GET /v2/templates/base-configs
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v2/templates/base-configs
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
List all available base configuration files
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: List of base configuration files returned
|
||||
|
||||
Output
|
||||
*******
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>filename</td>
|
||||
<td>string</td>
|
||||
<td>Name of the base configuration file</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_get_templatesbaseconfigs.txt
|
||||
@@ -0,0 +1,90 @@
|
||||
/v2/templates/{template_id}/base-config/{filename}
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v2/templates/**{template_id}**/base-configs/**{filename}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
List all available base configuration files
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: List of base configuration files returned
|
||||
|
||||
Output
|
||||
*******
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>filename</td>
|
||||
<td>string</td>
|
||||
<td>Name of the base configuration file</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_get_templateidbaseconfig.txt
|
||||
|
||||
|
||||
PUT /v2/templates/**{template_id}**/base-config/**{filename}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Update base configuration file content
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: File updated
|
||||
- **404**: File not found
|
||||
|
||||
Input
|
||||
*******
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Mandatory</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr><td>content</td><td>✔</td><td>string</td><td>New file content</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Mandatory</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr><td>template_id</td><td>✔</td><td>string</td><td>Template UUID</td></tr>
|
||||
<tr><td>filename</td><td>✔</td><td>string</td><td>Base configuration filename</td></tr>
|
||||
<tr><td>content</td><td>✔</td><td>string</td><td>Updated file content</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_put_templateidbaseconfig.txt
|
||||
Reference in new issue
Block a user