Commit dcc957f7 authored by José San Juan's avatar José San Juan

Update README.md

parent a25984b8
...@@ -272,3 +272,84 @@ data:{"acronym": "pwrctrl_14", "connected": true, "deviceTemperature": 22.064226 ...@@ -272,3 +272,84 @@ data:{"acronym": "pwrctrl_14", "connected": true, "deviceTemperature": 22.064226
... ...
``` ```
--- ---
## Commands End Point
### Get commands
### Request
**URL:** api/v1/commands
**Method:** GET
**Accepts:** application/json
#### Success Response:####
**Code:** 200 OK
**Payload:**
```javascript
[
{
"executionID": "e70dd2ee-e827-42a4-a18c-3964073b9def",
"status": "EXECUTED",
"finished": true,
"errorMsg": null,
"acronym": "Switch on PRMPW_GIANO_TIPTILT",
"startTime": 1475234740347,
"finishTime": 1475234741856,
"timeout": true
},
{
"executionID": "40ddc25d-10be-4d9f-8e84-42377e3689cd",
"status": "EXECUTED",
"finished": true,
"errorMsg": null,
"acronym": "Switch off PRMPW_GIANO_TIPTILT",
"startTime": 1475234741970,
"finishTime": 1475234742980,
"timeout": true
}
]...
```
---
### Get the status of a command by uuid
#### Request
**URL:** api/v1/commands/[UUID]
**Method:** GET
**Accepts:** application/json
#### Success Response:
**Code:** 200 OK
**Payload:**
```javascript
{
"executionID": "[UUID]",
"status": "EXECUTED",
"finished": true,
"errorMsg": null,
"acronym": "Switch on PRMPW_GIANO_TIPTILT",
"startTime": 1475234740347,
"finishTime": 1475234741856,
"timeout": true
}
```
#### Error Response:
**Code:** 404 Not found
**Content:**
```javascript
{
"timestamp": 1475235014836,
"status": 404,
"error": "Not Found",
"exception": "es.iac.tng.services.remotepower.api.exceptions.ElementNotFoundException",
"message": "Could not find e70dd2ee-e837-42a4-a18c-3964073b9def",
"path": "/remotepower/api/v1/commands/[UUID]"
}
```
**Code:** 400 Bad Request
**Content:**
```javascript
{
"timestamp": 1475235051442,
"status": 400,
"error": "Bad Request",
"exception": "es.iac.tng.services.remotepower.api.exceptions.MalformedParameterException",
"message": "Invalid UUID string: e70dd2ee-e42a4-a18c-3964073b9def",
"path": "/remotepower/api/v1/commands/[MALFORMED_UUID]"
}
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment