gns3-server/docs/api/v2/controller/drawing/projectsprojectiddrawings.rst

74 lines
3.8 KiB
ReStructuredText
Raw Normal View History

2016-06-23 12:17:23 +03:00
/v2/projects/{project_id}/drawings
2016-06-21 11:35:43 +03:00
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
2016-06-23 12:17:23 +03:00
GET /v2/projects/**{project_id}**/drawings
2016-06-21 11:35:43 +03:00
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-06-23 12:17:23 +03:00
List drawings of a project
2016-06-21 11:35:43 +03:00
Parameters
**********
- **project_id**: Project UUID
Response status codes
**********************
2016-06-23 12:17:23 +03:00
- **200**: List of drawings returned
2016-06-21 11:35:43 +03:00
Sample session
***************
2016-06-23 12:17:23 +03:00
.. literalinclude:: ../../../examples/controller_get_projectsprojectiddrawings.txt
2016-06-21 11:35:43 +03:00
2016-06-23 12:17:23 +03:00
POST /v2/projects/**{project_id}**/drawings
2016-06-21 11:35:43 +03:00
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-06-23 12:17:23 +03:00
Create a new drawing instance
2016-06-21 11:35:43 +03:00
Parameters
**********
- **project_id**: Project UUID
Response status codes
**********************
- **400**: Invalid request
2016-06-23 12:17:23 +03:00
- **201**: Drawing created
2016-06-21 11:35:43 +03:00
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2016-06-23 13:29:15 +03:00
<tr><td>drawing_id</td> <td> </td> <td>string</td> <td>Drawing UUID</td> </tr>
2016-06-21 11:35:43 +03:00
<tr><td>project_id</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
2016-06-22 19:14:14 +03:00
<tr><td>rotation</td> <td> </td> <td>integer</td> <td>Rotation of the element</td> </tr>
2016-06-23 12:17:23 +03:00
<tr><td>svg</td> <td> </td> <td>string</td> <td>SVG content of the drawing</td> </tr>
2016-06-21 11:35:43 +03:00
<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>
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
2016-06-23 13:29:15 +03:00
<tr><td>drawing_id</td> <td> </td> <td>string</td> <td>Drawing UUID</td> </tr>
2016-06-21 11:35:43 +03:00
<tr><td>project_id</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
2016-06-22 19:14:14 +03:00
<tr><td>rotation</td> <td> </td> <td>integer</td> <td>Rotation of the element</td> </tr>
2016-06-23 12:17:23 +03:00
<tr><td>svg</td> <td> </td> <td>string</td> <td>SVG content of the drawing</td> </tr>
2016-06-21 11:35:43 +03:00
<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
***************
2016-06-23 12:17:23 +03:00
.. literalinclude:: ../../../examples/controller_post_projectsprojectiddrawings.txt
2016-06-21 11:35:43 +03:00