- 
                Notifications
    You must be signed in to change notification settings 
- Fork 87
RESTful API For Host
        Echo edited this page Apr 5, 2018 
        ·
        7 revisions
      
    Request
GET /saltshaker/api/v1.0/host/h-dcf2af4c389411e881ef000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "host": {
        "id": "h-dcf2af4c389411e881ef000c298454d8",
        "tag": "",
        "group_id": [],
        "minion_id": "10.11.1.10",
        "product_id": "p-b4aaef1e322611e8ab56000c298454d8"
    }
}
Request
GET /saltshaker/api/v1.0/host?product_id=p-b4aaef1e322611e8ab56000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "hosts": {
        "host": [
            {
                "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"
            }
        ]
    }
}
Request
POST /saltshaker/api/v1.0/groups
POST Body
{
	"name": "test01",
	"product_id": "p-bbfc8b5221d611e894b0000c298454d8"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": true,
    "message": ""
}
Request
DELETE /saltshaker/api/v1.0/groups/g-42fcb22e28fa11e8a7e3000c298454d8
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",
    "group_id": ["g-142120c8323411e8ab56000c298454d8","g-191b9cc0323411e8ab56000c298454d8"],
    "product_id":"p-b4aaef1e322611e8ab56000c298454d8"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": true,
    "message": ""
}