opFlow API Reference
This page is deprecated
Authentication
Authentication is required to access all methods listed below.
POST login (authenticate)
POST /cgi-omk/opFlow.pl
Authenticate to opFlow.
Request
Parameter | Description |
---|---|
auth_username | The username to authenticate with |
auth_password | The password for the user |
Successful Response
A cookie is created and sent with the response. This must be saved and passed with all requests below.
Common Parameters
Many of the parameters are common over all calls and are used when they make sense.
Parameters
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
topn | Number of rows to return, any extra will be summarised into "Other" category | ||||||||
dns | "true", "false" or empty. When "true" opData will convert the IP address into a name for display (when relevant, eg. flowEndPoints) | ||||||||
summary | The column to summarise the values by.
| ||||||||
time_tag_start | Epoch time to start the time period | ||||||||
time_tag_end | Epoch time to end the time period | ||||||||
period | [ Optional ] - If provided and time_tag_start/time_tag_end are not, this will set time_tag_start/time_tag_end from the current time back period. If start/end are provided they will override. accepts m/h/d, eg. 15m, 2h, 3d | ||||||||
application | Filter by application given (when relevant) | ||||||||
port | Filter by port given (when relevant) | ||||||||
agent | Filter flows by specified agent | ||||||||
site_name | Filter flows by site | ||||||||
endpoint | Filter flows by endpoint (when relevant) |
TopN
GET TopN for time period
GET /cgi-omk/opData.pl
This will return a structure
Required Parameters (along with common parameters)
Parameter | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
act | Tells opData which data model you would like to load, all return TopN + Other (if there are extra)
| ||||||||||||||||||
summarise | the size in seconds of each time slice, eg, 60 with flowEndPoints will summarise all records for each endpoint for each minute (so the dataset will have 1 record for every 60 seconds for each TopN endpoint) |
Request example output:
{ "data": [ { "data": [ 797, 10147, 18322, 36579, 8059, 43464, 3658, 18222, 27292, 4002, 43059, 3556, 8689, 36700, 0, 0 ], "name": "Other", "type": "area" }, { "data": [ 0, 0, 0, 0, 0, 0, 18554181, 30147004, 61861232, 72973960, 3795368, 134633928, 0, 0, 0, 0 ], "name": "ssh:server1.opmantek.com", "type": "area" } ], "func": "flowAppSources", "interval": 60000, "javascript_time_tag_start": [ 2014, 10, "06", 11, 30, 44, 0 ], "time_tag_end_label": "6-Nov-2014 11:45:44", "time_tag_start_label": "6-Nov-2014 11:30:44" }
GET TopN summarised by time period (pie charts)
GET /cgi-omk/opData.pl
Required Parameters (along with common parameters)
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
act | Tells opData which data model you would like to load, all return TopN + Other (if there are extra)
|
Example output:
{ "data": [ { "id": "192.168.1.1", "model": "topnEndPoints", "name": "server1.opmantek.com (192.168.1.1)", "y": 0.88 }, { "id": "Other", "model": "topnEndPoints", "name": "Other", "y": 0.12 }, ], "func": "topnEndPoints", "javascript_time_tag_start": [ 2014, 10, "06", 11, 30, 44, 0 ] }