Updated The Glances RESTFULL JSON API (markdown)

Nicolas Hennion 2017-11-12 17:09:17 +01:00
parent 227b3ab96f
commit e4f3950e2c

@ -14,7 +14,7 @@ The RESTful API is located at:
`http://{glances server IP@}:61208/api/2`
Request example with Curl:
Memory stats request example with Curl:
$ curl http://localhost:61208/api/2/mem
{"available": 3627708416, "used": 4244357120, "cached": 2746822656, "percent": 53.9, "free": 3627708416, "inactive": 2100039680, "active": 4159094784, "shared": 384692224, "total": 7872065536, "buffers": 395943936}
@ -48,7 +48,7 @@ Server: WSGIServer/0.1 Python/2.7.12
From Glances version 3 and higher, support of Gzip encoding is provided (active by default with Httpie). For Curl, add the followings tags:
$ curl -H "Accept-encoding: gzip" --compressed -v http://localhost:61208/api/2/all
$ curl -H "Accept-encoding: gzip" --compressed -v http://localhost:61208/api/2/mem
< Content-Encoding: gzip
***