-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For History
Echo edited this page May 3, 2018
·
2 revisions
Request
GET /saltshaker/api/v1.0/history?type=shell&product_id=p-4bc4a5b83bd011e8aa0e000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"time": "2018-05-03 20:47:12",
"type": "shell",
"result": {
"10.10.10.22": " 20:53:29 up 150 days, 9:43, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT",
"10.10.10.23": " 20:53:29 up 150 days, 9:51, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT"
},
"command": "w",
"user_id": "u-d74e5e0c44f011e89fa5000c298454d8",
"minion_id": [
"10.10.10.22",
"10.10.10.23"
],
"product_id": "p-4bc4a5b83bd011e8aa0e000c298454d8",
"username": "admin"
},
{
"time": "2018-05-03 20:47:08",
"type": "shell",
"result": {
"10.10.10.22": " 20:53:24 up 150 days, 9:43, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT"
},
"command": "w",
"user_id": "u-d74e5e0c44f011e89fa5000c298454d8",
"minion_id": [
"10.10.10.22"
],
"product_id": "p-4bc4a5b83bd011e8aa0e000c298454d8",
"username": "admin"
},
],
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/history?type=sls&product_id=p-4bc4a5b83bd011e8aa0e000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"time": "2018-05-03 20:47:12",
"type": "sls",
"result": {
"10.10.10.22": " 20:53:29 up 150 days, 9:43, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT",
"10.10.10.23": " 20:53:29 up 150 days, 9:51, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT"
},
"command": "w",
"user_id": "u-d74e5e0c44f011e89fa5000c298454d8",
"minion_id": [
"10.10.10.22",
"10.10.10.23"
],
"product_id": "p-4bc4a5b83bd011e8aa0e000c298454d8",
"username": "admin"
},
{
"time": "2018-05-03 20:47:08",
"type": "sls",
"result": {
"10.10.10.22": " 20:53:24 up 150 days, 9:43, 0 users, load average: 0.00, 0.01, 0.05\nUSER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT"
},
"command": "w",
"user_id": "u-d74e5e0c44f011e89fa5000c298454d8",
"minion_id": [
"10.10.10.22"
],
"product_id": "p-4bc4a5b83bd011e8aa0e000c298454d8",
"username": "admin"
},
],
"status": true,
"message": ""
}