1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 19:28:07 +00:00
gns3-server/docs/api/v1projectsprojectid.rst

82 lines
3.6 KiB
ReStructuredText
Raw Normal View History

2015-02-04 09:31:31 +00:00
/v1/projects/{project_id}
-----------------------------------------------------------
2015-01-23 15:19:17 +00:00
.. contents::
2015-02-04 09:31:31 +00:00
GET /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-26 08:36:26 +00:00
Get project information
2015-01-23 15:19:17 +00:00
Parameters
**********
2015-02-04 09:31:31 +00:00
- **project_id**: The UUID of the project
2015-01-23 15:19:17 +00:00
Response status codes
**********************
2015-02-04 09:31:31 +00:00
- **200**: Success
- **404**: The project doesn't exist
2015-01-23 15:19:17 +00: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 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>
</table>
2015-01-23 15:21:26 +00:00
2015-02-04 09:31:31 +00:00
PUT /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 15:19:17 +00:00
Update a project
Parameters
**********
2015-02-04 09:31:31 +00:00
- **project_id**: The UUID of the project
2015-01-23 15:19:17 +00:00
Response status codes
**********************
2015-02-04 09:31:31 +00:00
- **200**: The project has been updated
2015-02-05 00:13:35 +00:00
- **403**: You are not allowed to modify this property
2015-02-04 09:31:31 +00:00
- **404**: The project doesn't exist
2015-01-23 15:19:17 +00:00
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2015-02-05 00:13:35 +00: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 15:19:17 +00: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 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>
</table>
2015-01-23 15:21:26 +00:00
2015-02-04 09:31:31 +00:00
DELETE /v1/projects/**{project_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-01-23 15:19:17 +00:00
Delete a project from disk
Parameters
**********
2015-02-04 09:31:31 +00:00
- **project_id**: The UUID of the project
2015-01-23 15:19:17 +00:00
Response status codes
**********************
2015-02-04 09:31:31 +00:00
- **404**: The project doesn't exist
- **204**: Changes have been written on disk
2015-01-23 15:19:17 +00:00