From d88b5ae1967b475b9091612cb5677e731b00b459 Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Fri, 25 May 2018 13:00:24 +0100 Subject: [PATCH] Updated CLMC service API documentation --- docs/clmc-service.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/clmc-service.md b/docs/clmc-service.md index 13a9a37..c80433f 100644 --- a/docs/clmc-service.md +++ b/docs/clmc-service.md @@ -46,7 +46,7 @@ All source code, tests and configuration files of the service can be found in th Returns a JSON-formatted response with the configuration data of the aggregator - *aggregator_report_period*, *aggregator_database_name*, *aggregator_database_url*. - * Response Example: + * Response Body Example: ```json { @@ -65,7 +65,7 @@ All source code, tests and configuration files of the service can be found in th Expects a JSON-formatted request body with the new configuration of the aggregator. The body should contain only three key fields - *aggregator_report_period* (positive integer, seconds), *aggregator_database_name* and *aggregator_database_url* (a valid URL). - * Request Example: + * Request Body Example: ```json { @@ -80,7 +80,7 @@ All source code, tests and configuration files of the service can be found in th The body of the request is first validated before updating the configuration. If validation is successful, returns a JSON-formatted response with the new configuration data. Otherwise, an **HTTP Bad Request** response is returned. - * Response Example: + * Response Body Example: ```json { @@ -94,9 +94,9 @@ All source code, tests and configuration files of the service can be found in th If the configuration is updated, while the aggregator is running, it is not automatically restarted. An explicit API call must be made with a *restart* request to apply the updated configuration. In the case of such PUT request as the one described - above, the response will contain more information indicating that the configuration of the aggregator is malformed + above, the response will contain more information indicating that the configuration of the aggregator is in a malformed state. - * Response Example: + * Response Body Example: ```json { @@ -114,18 +114,18 @@ All source code, tests and configuration files of the service can be found in th * Response: - Returns a JSON-formatted response with the status data of the aggregator - *aggregator_running*. If the aggregator - is running in a malformed state, the response will also indicate this with two additional fields - *malformed* and *comment* + Returns a JSON-formatted response with the status data of the aggregator - *aggregator_running* field. If the aggregator + is running in a malformed state, the response will also indicate this with two additional fields - *malformed* and *comment*. - * Response Example: + * Response Body Example: ```json { - "aggregator_running": false + "aggregator_running": true } ``` - * Response Example - for malformed configuration: + * Response Body Example - for malformed configuration: ```json { @@ -144,7 +144,7 @@ All source code, tests and configuration files of the service can be found in th Expects a JSON-formatted request body with the new status of the aggregator. The body should contain only one key field - *action* (the action to undertake, which can be **start**, **restart** or **stop**) - * Request Example: + * Request Body Example: ```json { @@ -158,7 +158,7 @@ All source code, tests and configuration files of the service can be found in th then the validation will fail. If validation is successful, returns a JSON-formatted response with the new status of the aggregator. Otherwise, an **HTTP Bad Request** response is returned. - * Response Example: + * Response Body Example: ```json { -- GitLab