1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-11 09:38:08 +00:00
gns3-server/docs/api/v1/project/projects.rst

46 lines
2.5 KiB
ReStructuredText
Raw Normal View History

2015-02-04 09:31:31 +00:00
/v1/projects
----------------------------------------------------------------------------------------------------------------------
2015-01-20 14:21:13 +00:00
.. contents::
2015-02-04 09:31:31 +00:00
POST /v1/projects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-02-04 09:31:31 +00:00
Create a new project on the server
2015-01-20 14:21:13 +00:00
Response status codes
**********************
2015-02-27 17:39:20 +00:00
- **201**: Project created
- **409**: Project already created
2015-01-20 14:21:13 +00: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>
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</td> </tr>
2015-02-04 09:31:31 +00:00
<tr><td>project_id</td> <td> </td> <td>['string', 'null']</td> <td>Project UUID</td> </tr>
2015-01-23 15:19:17 +00:00
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
2015-01-20 14:21:13 +00:00
</table>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2015-01-23 15:19:17 +00:00
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
<tr><td>name</td> <td> </td> <td>string</td> <td>Project name</td> </tr>
2015-02-05 00:13:35 +00:00
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
2015-02-04 09:31:31 +00:00
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
2015-01-23 15:19:17 +00:00
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
2015-01-20 14:21:13 +00:00
</table>
2015-02-24 10:38:57 +00:00
Sample session
***************
.. literalinclude:: ../../examples/post_projects.txt