gns3-server/docs/api/v2/controller/template/templatestemplateidduplicate.rst

42 lines
2.4 KiB
ReStructuredText
Raw Normal View History

2019-03-28 09:24:02 +00:00
/v2/templates/{template_id}/duplicate
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v2/templates/**{template_id}**/duplicate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Duplicate an template
Parameters
**********
- **template_id**: Template UUID
Response status codes
**********************
- **201**: Template duplicated
- **400**: Invalid request
- **404**: Template doesn't exist
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>builtin</td> <td>&#10004;</td> <td>boolean</td> <td>Template is builtin</td> </tr>
<tr><td>category</td> <td>&#10004;</td> <td></td> <td>Template category</td> </tr>
<tr><td>compute_id</td> <td>&#10004;</td> <td>string</td> <td>Compute identifier</td> </tr>
<tr><td>default_name_format</td> <td>&#10004;</td> <td>string</td> <td>Default name format</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>Template name</td> </tr>
<tr><td>symbol</td> <td>&#10004;</td> <td>string</td> <td>Symbol of the template</td> </tr>
<tr><td>template_id</td> <td>&#10004;</td> <td>string</td> <td>Template UUID</td> </tr>
<tr><td>template_type</td> <td>&#10004;</td> <td>enum</td> <td>Possible values: cloud, ethernet_hub, ethernet_switch, docker, dynamips, vpcs, traceng, virtualbox, vmware, iou, qemu</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/controller_post_templatestemplateidduplicate.txt