'Glances API RESTFul implementation.
Return the JSON representation of all the plugins
HTTP/200 if OK
HTTP/400 if plugin is not found
HTTP/404 if others error'

def _api_all(self):

    response.content_type = 'application/json'
    if self.args.debug:
        fname = os.path.join(tempfile.gettempdir(), 'glances-debug.json')
        try:
            with open(fname) as f:
                return f.read()
        except IOError:
            logger.debug(('Debug    file    (%s)    not    found' % fname))
    self.__update__()
    try:
        statval = json.dumps(self.stats.getAllAsDict())
    except Exception as e:
        abort(404, ('Cannot    get    stats    (%s)' % str(e)))
    return statval
