From 50402568d2edb6c509f378c8e52b062dd605f755 Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Mon, 7 Jul 2014 06:02:50 -0700 Subject: [PATCH] Updated The Glances RESTFULL JSON API (markdown) --- The-Glances-RESTFULL-JSON-API.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/The-Glances-RESTFULL-JSON-API.md b/The-Glances-RESTFULL-JSON-API.md index 7dcddda..537d81b 100644 --- a/The-Glances-RESTFULL-JSON-API.md +++ b/The-Glances-RESTFULL-JSON-API.md @@ -20,7 +20,7 @@ Return the plugins available on the Glances server. Request parameters: -None +* None Request response: @@ -29,9 +29,31 @@ Request response: Example: +_/api/v2/pluginslist_ ``` ["load", "core", "uptime", "fs", "memswap", "monitor", "percpu", "mem", "sensors", "system", "alert", "psutilversion", "processlist", "diskio", "hddtemp", "processcount", "batpercent", "now", "cpu", "network", "help"] ``` +*** + +_**/api/2/:plugin**_ + +Return the stats for the specific ``plugin`` + +Request parameters: + +* plugin: plugin name + +Request response: + +* 200 - application/json: dictionnary +* 404 - Returned if the property does not exist + +Example: + +_/api/v2/mem_ +``` +{"available": 5071183872, "used": 3255848960, "cached": 1827352576, "percent": 39.1, "free": 5071183872, "inactive": 1388982272, "active": 3679604736, "total": 8327032832, "buffers": 477982720} +```