'Glances API RESTFul implementation.
Return the JSON views of a given plugin
HTTP/200 if OK
HTTP/400 if plugin is not found
HTTP/404 if others error'

def _api_views(self, plugin):

    response.content_type = 'application/json'
    if (plugin not in self.plugins_list):
        abort(400, ('Unknown    plugin    %s    (available    plugins:    %s)' % (plugin, self.plugins_list)))
    try:
        ret = self.stats.get_plugin(plugin).get_views()
    except Exception as e:
        abort(404, ('Cannot    get    views    for    plugin    %s    (%s)' % (plugin, str(e))))
    return ret
