Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
José San Juan
remotepower
Commits
dcc957f7
Commit
dcc957f7
authored
Sep 30, 2016
by
José San Juan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
a25984b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
0 deletions
+81
-0
README.md
README.md
+81
-0
No files found.
README.md
View file @
dcc957f7
...
...
@@ -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]
"
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment