Update documentation

This commit is contained in:
Julien Duponchelle committed 2016-07-26 19:57:53 +02:00
1 parent 68eca6c111
commit c96bd5f2a9
211 files changed
+999 -717

No files matched your search

@@ -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>&#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
@@ -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>&#10004;</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