1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 00:08:11 +00:00
gns3-server/docs/api/v2/controller/snapshot/projectsprojectidsnapshots.rst

66 lines
2.5 KiB
ReStructuredText
Raw Normal View History

2016-07-26 17:57:53 +00:00
/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>&#10004;</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>&#10004;</td> <td>integer</td> <td>Date of the snapshot (UTC timestamp)</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>Project name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>snapshot_id</td> <td>&#10004;</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