manageengineapi.NFApi — Netflow Session Controller

class manageengineapi.manageengineapi.NFApi(hostname, api_key, user, password, port='8080', protocol='http', timeout=30)

Class for interacting with ManageEngine Netflow Analyzer API. API calls are handled with requests session object. All GETs against API will return JSON object to caller.

add_bill_plan(billplan)

Function to add Bill Plan.

Parameters:billplan (manageengineapi.BillPlan) – Object of bill plan
Returns:json
add_ip_group(ipgroup)

Function to add IPGroup. Function should be passed an IPGroup object type. https://www.manageengine.com/products/netflow/help/admin-operations/ip-group-mgmt.html

Parameters:ipgroup (manageengineapi.IPGroup) – object of IP Group
Returns:json
Return type:json
delete_bill_plan(bp)

Function to delete billing plan object. Must be passed a BillPlan object.

Parameters:bp (manageengineapi.BillPlan) – existing bill plan
Returns:json
delete_ip_group(ipg_obj)

Function to delete an IPGroup object. The only required parameter for this is GroupName.

Parameters:ipg_obj (manageengineapi.IPGroup) – existing ip group
Returns:json
get_bill_plans()

All billing plans returned as list of BillPlan objects

Return type:list
Returns:list of BillPLan
get_dev_list()

List all devices/IP Groups and their unique IDs. Needed for adding bill plans and IP groups. Returns a list of Device objects.

Returns:list of Device
Return type:list
get_group_conversation_data(ipgroup, payload={})

Get conversation data for a specific IP group. IP group should be ID based, not named based. Using default params for now, will expand to include more later.

Parameters:ipgroup (str) – ID number of IPGroup
Returns:json
get_group_traffic_data(ipgroup, payload={})

Get traffic data for specific IP group.

Parameters:ipgroup (str) – ID number of IPGroup
Returns:json
get_ip_groups()

All IPGroups returned as list of IPGroup objects.

Return type:list
login()

Create requests session object, modify its cookie/header content, log in to API and retrieve NFA_SSO token to be used for all functions

modify_bill_plan(billplan)

Function to modify billing object. Looks like it takes same paramters as add_billing, but must also include a unique identifier ‘plan id’.

Parameters:billplan (manageengineapi.BillPlan) – existing billing object
Returns:json
modify_ip_group(ipgroup)

Function to modify IPGroup object. Doesn’t appear to have any unique parameters, should be able to query for IPGroup object with get_ip_groups, modify what we need to modify, then pass to this function to udpate the existing object.

Parameters:ipgroup (manageengineapi.IPGroup) – existing ip group
Returns:json