-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For Host
Echo edited this page Apr 27, 2018
·
7 revisions
Request
GET /saltshaker/api/v1.0/host/h-dcf2af4c389411e881ef000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": "h-dcf2af4c389411e881ef000c298454d8",
"tag": "",
"groups": [
"group01",
"group03"
],
"minion_id": "10.11.1.10",
"product_id": "p-b4aaef1e322611e8ab56000c298454d8"
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/host?product_id=p-b4aaef1e322611e8ab56000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"id": "h-dcf2af4c389411e881ef000c298454d8",
"tag": "",
"group_id": [],
"minion_id": "10.11.1.10",
"product_id": "p-b4aaef1e322611e8ab56000c298454d8"
},
{
"id": "h-dcf2af4d389411e881ef000c298454d8",
"tag": "",
"group_id": [],
"minion_id": "119.45.44.44",
"product_id": "p-b4aaef1e322611e8ab56000c298454d8"
}
],
"status": true,
"message": ""
}
Request
POST /saltshaker/api/v1.0/host
POST Body
{
"tag": "ok",
"minion_id": "100.11.1.10",
"product_id": "p-b4aaef1e322611e8ab56000c298454d8"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
DELETE /saltshaker/api/v1.0/host/h-dcf2af4d389411e881ef000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
PUT /saltshaker/api/v1.0/groups/g-42fcb22e28fa11e8a7e3000c298454d8
PUT Body
{
"tag": "error",
"product_id":"p-b4aaef1e322611e8ab56000c298454d8",
"minion_id":"10.10.10.1"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}