mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Update API documentation
This commit is contained in:
1 parent
21a7a68875
commit
e6d2bd4424
360 files changed
+17598
-896
No files matched your search
@@ -15,6 +15,12 @@ Response status codes
|
||||
**********************
|
||||
- **200**: List of drawings returned
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_get_projectsprojectiddrawings.txt
|
||||
|
||||
|
||||
POST /v2/projects/**{project_id}**/drawings
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -26,8 +32,8 @@ Parameters
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Drawing created
|
||||
- **400**: Invalid request
|
||||
|
||||
Input
|
||||
*******
|
||||
@@ -59,3 +65,9 @@ Output
|
||||
<tr><td>z</td> <td> </td> <td>integer</td> <td>Z property</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectiddrawings.txt
|
||||
|
||||
@@ -3,19 +3,56 @@
|
||||
|
||||
.. contents::
|
||||
|
||||
PUT /v2/projects/**{project_id}**/drawings/**{drawing_id}**
|
||||
GET /v2/projects/**{project_id}**/drawings/**{drawing_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new drawing instance
|
||||
Get a drawing instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **drawing_id**: Drawing UUID
|
||||
- **project_id**: Project UUID
|
||||
- **drawing_id**: Drawing UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Drawing found
|
||||
- **400**: Invalid request
|
||||
- **404**: Drawing doesn't exist
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>drawing_id</td> <td> </td> <td>string</td> <td>Drawing UUID</td> </tr>
|
||||
<tr><td>project_id</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>rotation</td> <td> </td> <td>integer</td> <td>Rotation of the element</td> </tr>
|
||||
<tr><td>svg</td> <td> </td> <td>string</td> <td>SVG content of the drawing</td> </tr>
|
||||
<tr><td>x</td> <td> </td> <td>integer</td> <td>X property</td> </tr>
|
||||
<tr><td>y</td> <td> </td> <td>integer</td> <td>Y property</td> </tr>
|
||||
<tr><td>z</td> <td> </td> <td>integer</td> <td>Z property</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_get_projectsprojectiddrawingsdrawingid.txt
|
||||
|
||||
|
||||
PUT /v2/projects/**{project_id}**/drawings/**{drawing_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a drawing instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **drawing_id**: Drawing UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Drawing updated
|
||||
- **400**: Invalid request
|
||||
|
||||
Input
|
||||
*******
|
||||
@@ -47,6 +84,12 @@ Output
|
||||
<tr><td>z</td> <td> </td> <td>integer</td> <td>Z property</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_put_projectsprojectiddrawingsdrawingid.txt
|
||||
|
||||
|
||||
DELETE /v2/projects/**{project_id}**/drawings/**{drawing_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -54,11 +97,17 @@ Delete a drawing instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **drawing_id**: Drawing UUID
|
||||
- **project_id**: Project UUID
|
||||
- **drawing_id**: Drawing UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **204**: Drawing deleted
|
||||
- **400**: Invalid request
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_delete_projectsprojectiddrawingsdrawingid.txt
|
||||
|
||||
Reference in new issue
Block a user