From 12e2b7ec797eb9bac5d540408b319277c285a171 Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Mon, 7 Jul 2014 06:07:57 -0700 Subject: [PATCH] Updated The Glances RESTFULL JSON API (markdown) --- The-Glances-RESTFULL-JSON-API.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/The-Glances-RESTFULL-JSON-API.md b/The-Glances-RESTFULL-JSON-API.md index 537d81b..21b0ceb 100644 --- a/The-Glances-RESTFULL-JSON-API.md +++ b/The-Glances-RESTFULL-JSON-API.md @@ -27,12 +27,12 @@ Request response: * 200 - application/json: list * 404 - Returned if the property does not exist -Example: +Example: _/api/v2/pluginslist_ -_/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**_ @@ -48,13 +48,32 @@ Request response: * 200 - application/json: dictionnary * 404 - Returned if the property does not exist -Example: +Example: _/api/v2/mem_ -_/api/v2/mem_ ``` {"available": 5071183872, "used": 3255848960, "cached": 1827352576, "percent": 39.1, "free": 5071183872, "inactive": 1388982272, "active": 3679604736, "total": 8327032832, "buffers": 477982720} ``` +*** +_**/api/2/:plugin/:item**_ +Return the ``item`` stat for the specific ``plugin`` +Request parameters: + +* plugin: plugin name +* item: item to retreive + +Request response: + +* 200 - application/json: dictionnary +* 404 - Returned if the property does not exist + +Example: _/api/v2/mem/used_ + +``` +{"used": 3255848960} +``` + +***