mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
Build documentation
This commit is contained in:
parent
547adf0dc6
commit
977ff0fb57
13
docs/api/examples/delete_projectuuid.txt
Normal file
13
docs/api/examples/delete_projectuuid.txt
Normal file
@ -0,0 +1,13 @@
|
||||
curl -i -X DELETE 'http://localhost:8000/project/{uuid}'
|
||||
|
||||
DELETE /project/{uuid} HTTP/1.1
|
||||
|
||||
|
||||
|
||||
HTTP/1.1 204
|
||||
CONNECTION: close
|
||||
CONTENT-LENGTH: 0
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 aiohttp/0.13.1
|
||||
X-ROUTE: /project/{uuid}
|
||||
|
@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid}
|
||||
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||
"script_file": null,
|
||||
"startup_script": null,
|
||||
"uuid": "925c4d08-58a5-4078-9e77-a6875e0c28dc"
|
||||
"uuid": "fbbcc900-7fd1-4fcc-bc70-5f7eee8397b9"
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ POST /project HTTP/1.1
|
||||
|
||||
HTTP/1.1 200
|
||||
CONNECTION: close
|
||||
CONTENT-LENGTH: 78
|
||||
CONTENT-LENGTH: 102
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 aiohttp/0.13.1
|
||||
@ -17,5 +17,6 @@ X-ROUTE: /project
|
||||
|
||||
{
|
||||
"location": "/tmp",
|
||||
"temporary": false,
|
||||
"uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
||||
}
|
||||
|
13
docs/api/examples/post_projectuuidclose.txt
Normal file
13
docs/api/examples/post_projectuuidclose.txt
Normal file
@ -0,0 +1,13 @@
|
||||
curl -i -X POST 'http://localhost:8000/project/{uuid}/close' -d '{}'
|
||||
|
||||
POST /project/{uuid}/close HTTP/1.1
|
||||
{}
|
||||
|
||||
|
||||
HTTP/1.1 204
|
||||
CONNECTION: close
|
||||
CONTENT-LENGTH: 0
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 aiohttp/0.13.1
|
||||
X-ROUTE: /project/{uuid}/close
|
||||
|
13
docs/api/examples/post_projectuuidcommit.txt
Normal file
13
docs/api/examples/post_projectuuidcommit.txt
Normal file
@ -0,0 +1,13 @@
|
||||
curl -i -X POST 'http://localhost:8000/project/{uuid}/commit' -d '{}'
|
||||
|
||||
POST /project/{uuid}/commit HTTP/1.1
|
||||
{}
|
||||
|
||||
|
||||
HTTP/1.1 204
|
||||
CONNECTION: close
|
||||
CONTENT-LENGTH: 0
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 aiohttp/0.13.1
|
||||
X-ROUTE: /project/{uuid}/commit
|
||||
|
@ -11,14 +11,21 @@ POST /virtualbox HTTP/1.1
|
||||
|
||||
HTTP/1.1 201
|
||||
CONNECTION: close
|
||||
CONTENT-LENGTH: 133
|
||||
CONTENT-LENGTH: 348
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 aiohttp/0.13.1
|
||||
X-ROUTE: /virtualbox
|
||||
|
||||
{
|
||||
"adapter_start_index": 0,
|
||||
"adapter_type": "Intel PRO/1000 MT Desktop (82540EM)",
|
||||
"adapters": 0,
|
||||
"enable_remote_console": false,
|
||||
"headless": false,
|
||||
"linked_clone": false,
|
||||
"name": "VM1",
|
||||
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||
"uuid": "c220788f-ee1e-491c-b318-6542d2f130bf"
|
||||
"uuid": "2908d568-4a42-49e1-9628-d914f2fd545d",
|
||||
"vmname": "VM1"
|
||||
}
|
||||
|
@ -21,5 +21,5 @@ X-ROUTE: /vpcs
|
||||
"project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||
"script_file": null,
|
||||
"startup_script": null,
|
||||
"uuid": "4d670947-44a8-4156-8626-adce3faa5ae6"
|
||||
"uuid": "5a2735f9-c38a-459c-8b7d-70ec56b62a7f"
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ Input
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
<tr><td>uuid</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
@ -27,8 +28,9 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>uuid</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
|
83
docs/api/projectuuid.rst
Normal file
83
docs/api/projectuuid.rst
Normal file
@ -0,0 +1,83 @@
|
||||
/project/{uuid}
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /project/**{uuid}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get project informations
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: Project instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: OK
|
||||
- **404**: Project instance doesn't exist
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
PUT /project/**{uuid}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: Project instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Project updated
|
||||
- **404**: Project instance doesn't exist
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<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>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
DELETE /project/**{uuid}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a project from disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: Project instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: Project instance doesn't exist
|
||||
- **204**: Changes write on disk
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/delete_projectuuid.txt
|
||||
|
24
docs/api/projectuuidclose.rst
Normal file
24
docs/api/projectuuidclose.rst
Normal file
@ -0,0 +1,24 @@
|
||||
/project/{uuid}/close
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /project/**{uuid}**/close
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Close project
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: Project instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: Project instance doesn't exist
|
||||
- **204**: Project closed
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_projectuuidclose.txt
|
||||
|
24
docs/api/projectuuidcommit.rst
Normal file
24
docs/api/projectuuidcommit.rst
Normal file
@ -0,0 +1,24 @@
|
||||
/project/{uuid}/commit
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /project/**{uuid}**/commit
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Write changes on disk
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: Project instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: Project instance doesn't exist
|
||||
- **204**: Changes write on disk
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_projectuuidcommit.txt
|
||||
|
@ -33,10 +33,17 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>adapter_start_index</td> <td> </td> <td>integer</td> <td>adapter index from which to start using adapters</td> </tr>
|
||||
<tr><td>adapter_type</td> <td> </td> <td>string</td> <td>VirtualBox adapter type</td> </tr>
|
||||
<tr><td>adapters</td> <td> </td> <td>integer</td> <td>number of adapters</td> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>linked_clone</td> <td> </td> <td>boolean</td> <td>either the VM is a linked clone or not</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VirtualBox VM instance name</td> </tr>
|
||||
<tr><td>project_uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VirtualBox VM instance UUID</td> </tr>
|
||||
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
|
19
docs/api/virtualboxuuidreload.rst
Normal file
19
docs/api/virtualboxuuidreload.rst
Normal file
@ -0,0 +1,19 @@
|
||||
/virtualbox/{uuid}/reload
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /virtualbox/**{uuid}**/reload
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Reload a VirtualBox VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: VirtualBox VM instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid VirtualBox VM instance UUID
|
||||
- **404**: VirtualBox VM instance doesn't exist
|
||||
- **204**: VirtualBox VM instance reloaded
|
||||
|
@ -27,10 +27,15 @@ PUT /vpcs/**{uuid}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: VPCS instance updated
|
||||
- **409**: Conflict
|
||||
- **404**: VPCS instance doesn't exist
|
||||
|
||||
Input
|
||||
*******
|
||||
@ -58,3 +63,17 @@ Output
|
||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VPCS device UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
DELETE /vpcs/**{uuid}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **404**: VPCS instance doesn't exist
|
||||
- **204**: VPCS instance deleted
|
||||
|
||||
|
@ -13,6 +13,7 @@ Parameters
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid VPCS instance UUID
|
||||
- **404**: VPCS instance doesn't exist
|
||||
- **204**: VPCS reloaded
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user