Skip to content

Commit

Permalink
Fix REST API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Apr 27, 2018
1 parent 14d095f commit ebf723e
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions doc/source/REST.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Next tables summaries the resources and the HTTP methods available.
| **GET** | | **List** the infrastructure IDs. | | **List** the virtual machines | | **Get** information associated to the |
| | | | in the infrastructure ``infId`` | | virtual machine ``vmId`` in ``infId``. |
+-------------+------------------------------------+------------------------------------+-------------------------------------------+
| **POST** | | **Create** a new infrastructure | | **Create** a new virtual machine | |
| | | based on the RADL posted | | based on the RADL posted. | |
| **POST** | | **Create** a new infrastructure | | **Create** a new virtual machine | | **Alter** VM properties based on |
| | | based on the RADL posted | | based on the RADL posted. | | then RADL posted |
+-------------+------------------------------------+------------------------------------+-------------------------------------------+
| **PUT** | | | | **Modify** the virtual machine based on |
| | | | | the RADL posted. |
Expand Down Expand Up @@ -233,9 +233,27 @@ GET ``http://imserver.com/infrastructures/<infId>/vms/<vmId>``
The result is JSON format has the following format::
{
["radl"|"state"|"contmsg"]: "<property_value>"
"radl": "<radl_in_json>"
}

POST ``http://imserver.com/infrastructures/<infId>/vms/<vmId>``
:body: ``RADL document``
:body Content-type: text/plain or application/json
:Response Content-type: text/plain or application/json
:ok response: 200 OK
:fail response: 401, 403, 404, 400, 415

Change the features of the virtual machine with ID ``vmId`` in the
infrastructure with with ID ``infId``, specified by the RADL ``radl``.
Return then information about the nodified virtual machine. The returned string is in RADL format,
either in plain RADL or in JSON formats.
See more the details of the output in :ref:`GetVMInfo <GetVMInfo-xmlrpc>`.
The result is JSON format has the following format::
{
"radl": "<radl_in_json>"
}

GET ``http://imserver.com/infrastructures/<infId>/vms/<vmId>/<property_name>``
:Response Content-type: text/plain or application/json
:ok response: 200 OK
Expand Down

0 comments on commit ebf723e

Please sign in to comment.