gns3-server/docs/api/v1projectsprojectid.rst

82 lines
3.8 KiB
ReStructuredText
Raw Normal View History

2015-02-04 11:31:31 +02:00
/v1/projects/{project_id}
-----------------------------------------------------------------------------------------------------------------
2015-01-23 17:19:17 +02:00
.. contents::
2015-02-04 11:31:31 +02:00
GET /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-26 10:36:26 +02:00
Get project information
2015-01-23 17:19:17 +02:00
Parameters
**********
2015-02-04 11:31:31 +02:00
- **project_id**: The UUID of the project
2015-01-23 17:19:17 +02:00
Response status codes
**********************
2015-02-04 11:31:31 +02:00
- **200**: Success
- **404**: The project doesn't exist
2015-01-23 17:19:17 +02:00
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
2015-02-05 02:13:35 +02:00
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
2015-02-04 11:31:31 +02:00
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
2015-01-23 17:19:17 +02:00
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
2015-01-23 17:21:26 +02:00
2015-02-04 11:31:31 +02:00
PUT /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 17:19:17 +02:00
Update a project
Parameters
**********
2015-02-04 11:31:31 +02:00
- **project_id**: The UUID of the project
2015-01-23 17:19:17 +02:00
Response status codes
**********************
2015-02-04 11:31:31 +02:00
- **200**: The project has been updated
2015-02-05 02:13:35 +02:00
- **403**: You are not allowed to modify this property
2015-02-04 11:31:31 +02:00
- **404**: The project doesn't exist
2015-01-23 17:19:17 +02:00
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2015-02-05 02:13:35 +02: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 17:19:17 +02: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>
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
2015-02-05 02:13:35 +02:00
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
2015-02-04 11:31:31 +02:00
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
2015-01-23 17:19:17 +02:00
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
2015-01-23 17:21:26 +02:00
2015-02-04 11:31:31 +02:00
DELETE /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 17:19:17 +02:00
Delete a project from disk
Parameters
**********
2015-02-04 11:31:31 +02:00
- **project_id**: The UUID of the project
2015-01-23 17:19:17 +02:00
Response status codes
**********************
2015-02-04 11:31:31 +02:00
- **404**: The project doesn't exist
- **204**: Changes have been written on disk
2015-01-23 17:19:17 +02:00