gns3-server/docs/api/v2/hypervisor/project/projectsprojectid.rst

101 lines
4.3 KiB
ReStructuredText
Raw Normal View History

2016-03-07 17:57:12 +01:00
/v2/hypervisor/projects/{project_id}
------------------------------------------------------------------------------------------------------------------------------------------
2015-01-23 16:19:17 +01:00
.. contents::
2016-03-07 17:57:12 +01:00
GET /v2/hypervisor/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-26 09:36:26 +01:00
Get project information
2015-01-23 16:19:17 +01:00
Parameters
**********
2015-02-04 10:31:31 +01:00
- **project_id**: The UUID of the project
2015-01-23 16:19:17 +01:00
Response status codes
**********************
2015-02-04 10:31:31 +01:00
- **200**: Success
- **404**: The project doesn't exist
2015-01-23 16:19:17 +01:00
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2016-01-04 17:04:15 +01:00
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
2016-03-11 15:21:21 +01:00
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</td> </tr>
2015-02-04 10:31:31 +01:00
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
2015-01-23 16:19:17 +01:00
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
2015-02-24 11:38:57 +01:00
Sample session
***************
.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectid.txt
2015-02-24 11:38:57 +01:00
2015-01-23 16:21:26 +01:00
2016-03-07 17:57:12 +01:00
PUT /v2/hypervisor/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 16:19:17 +01:00
Update a project
Parameters
**********
2015-02-04 10:31:31 +01:00
- **project_id**: The UUID of the project
2015-01-23 16:19:17 +01:00
Response status codes
**********************
2015-02-04 10:31:31 +01:00
- **200**: The project has been updated
2015-02-04 17:13:35 -07:00
- **403**: You are not allowed to modify this property
2015-02-04 10:31:31 +01:00
- **404**: The project doesn't exist
2015-01-23 16:19:17 +01:00
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>
2015-02-04 17:13:35 -07:00
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Path of the project on the server (work only with --local)</td> </tr>
2015-01-23 16:19:17 +01:00
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2016-01-04 17:04:15 +01:00
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
2016-03-11 15:21:21 +01:00
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</td> </tr>
2015-02-04 10:31:31 +01:00
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
2015-01-23 16:19:17 +01:00
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
2015-02-24 11:38:57 +01:00
Sample session
***************
.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectid.txt
2015-02-24 11:38:57 +01:00
2015-01-23 16:21:26 +01:00
2016-03-07 17:57:12 +01:00
DELETE /v2/hypervisor/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 16:19:17 +01:00
Delete a project from disk
Parameters
**********
2015-02-04 10:31:31 +01:00
- **project_id**: The UUID of the project
2015-01-23 16:19:17 +01:00
Response status codes
**********************
2015-02-04 10:31:31 +01:00
- **404**: The project doesn't exist
- **204**: Changes have been written on disk
2015-01-23 16:19:17 +01:00
2015-02-24 11:38:57 +01:00
Sample session
***************
.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectid.txt
2015-02-24 11:38:57 +01:00