python/docs/python_API_ntopng.md
The Ntopng class provides information about global data (e.g., list of interfaces) and consts (e.g., alert types).
__init__(self, username=None, password=None, auth_token=None, url="http://localhost:3000")Constructs a new Ntopng object.
username: The ntopng username (leave empty if token authentication is used) (string).password: The ntopng password (leave empty if token authentication is used) (string).auth_token: The authentication token (leave empty if username/password authentication is used) (integer).url: The default ntopng URL (e.g., http://localhost:3000) (string).get_url(self)Returns the ntopng URL.
issue_request(self, url, params)Issues a GET request.
url: The URL for the GET request (string).params: Parameters to include in the request (dictionary).issue_post_request(self, url, params)Issues a POST request.
url: The URL for the POST request (string).params: Parameters to include in the request (dictionary).enable_debug(self)Enables debugging mode.
request(self, url, params)Issues a GET request and returns the response.
url: The URL for the GET request (string).params: Parameters to include in the request (dictionary).post_request(self, url, params)Issues a POST request and returns the response.
url: The URL for the POST request (string).params: Parameters to include in the request (dictionary).get_alert_types(self)Returns all alert types.
get_alert_severities(self)Returns all severities.
get_interface(self, ifid)Returns an Interface instance.
ifid: The interface ID (integer).ntopng.Interface).get_historical_interface(self, ifid)Returns a Historical handle for an interface.
ifid: The interface ID (integer).ntopng.Historical).get_interfaces_list(self)Returns all available interfaces.
get_host_interfaces_list(self, host)Returns all ntopng interfaces for a given host.
host: The host (string).