-
Notifications
You must be signed in to change notification settings - Fork 163
Service API
This is the final Service API documentation for 1.0
-
GET
: returns JSON of all Service objects subgrouped by Host-
payload: none
-
success: 200
{ "foo_svc": { "foo": { "created_at": "2011-04-20 05:09:44 UTC", "updated_at": "2011-04-20 05:09:44 UTC", "tags": [ ], "id": "53504526-a5d7-a604-5fe8-1f8fd2e1aef0", "links": [ ], "status": "down" } }, "both": { "foo": { "created_at": "2011-04-20 05:08:46 UTC", "updated_at": "2011-04-20 05:08:46 UTC", "tags": [ ], "id": "f07f5f5f-ce0f-14ac-62c6-d3d3c9cd4dbd", "links": [ ], "status": "up" }, "bar": { "created_at": "2011-04-20 05:08:59 UTC", "updated_at": "2011-04-20 05:08:59 UTC", "tags": [ ], "id": "5275d27d-2936-74f8-9114-dd848a0a4a1e", "links": [ ], "status": "up" } }, "bar_svc": { "bar": { "created_at": "2011-04-20 05:09:59 UTC", "updated_at": "2011-04-20 05:09:59 UTC", "tags": [ ], "id": "b470e9c4-bfa0-456a-f117-3e187ce1fa60", "links": [ ], "status": "pending" } } }
-
failure: 404
-
error: 500
-
-
PUT
: Not supported. Possible future support for bulk operations -
POST
: not supported. Possible future support for bulk operations -
DELETE
: not supported.
-
GET
: returns JSON for all Services named servicename-
payload: none
-
success: 200
{ "foo_svc": { "foo": { "created_at": "2011-04-20 05:09:44 UTC", "updated_at": "2011-04-20 05:09:44 UTC", "tags": [ ], "id": "53504526-a5d7-a604-5fe8-1f8fd2e1aef0", "links": [ ], "status": "down" } } }
-
failure: 404
-
error: 500
-
-
PUT
: Not supported. -
POST
: Not supported. -
DELETE
: Deletes Service servicename. WARNING: Removesservicename
from all hosts attached to said Service-
payload: none
-
success: 200
{ "affected_hosts": 2, "result": "success", "service": "both", "action": "delete" }
-
failure: 404
-
error: 500
-
-
GET
: Returns Service servicename for Host hostname-
payload: none
-
success: 200
{ "name": "bar_svc", "updated_at": "2011-04-20 05:09:59 UTC", "tags": [ ], "id": "b470e9c4-bfa0-456a-f117-3e187ce1fa60", "links": [ ], "host": "bar", "status": "pending" }
-
failure: 404
-
error: 500
-
-
PUT
: Updates or optionally creates Service servicename and Host hostname-
require options:
status
,host_status
-
payload:
{ "status":"up", "host_status":"up" }
-
success: 200
{ "name": "new_svc", "result": "success", "action": "create", "id": "18fb336d-d175-8025-e3d1-bde57a95967c", "host": { "name": "foo", "action": "update", "status": "up" } }
-
failure: 404
-
error: 500
-
-
POST
: Not supported. -
DELETE
: Deletes Service servicename for Host hostname-
payload: none
-
success: 200
{ "result": "success", "service": "foo_svc", "action": "delete", "id": "53504526-a5d7-a604-5fe8-1f8fd2e1aef0", "host": "foo" }
-
failure: 404
-
error: 500
-