Search for visits by IP

Identify and display the ip address of a visit(or). This specific api call is turned off by default, please contact support@opentracker.net to turn this api call on.

API Usage

This API produces a json array. Use this URL to perform GET or POST requests. Visitors can also be retrieved by ip_number, and/ or a machine_idx.

Parameters

One or more of the following parameters are required:

filterByIp: Find all visits with specified ip_number. Default is all ip_numbers.
filterByMachineId Display data for these machine ids. Machine id is a unique identifier of each visitor. Default is all machine ids.
filterByVisitId Display data for these visit ids. Visit id is a unique identifier of each visit. Default is all visit ids.
date Display all visits from the specified date entered as yyyy-MM-dd. Default is the current date.
period The time-range considered for displaying the visits with respect to the date. For example: 3d for 3 days offset. Default is [1d].
offset The starting point from where records will display. Default is [0] (most recent chronological event).
limit The maximum number of records to be displayed in the output. Default is [40]. The maximum is 10,000.
login Your opentracker login email. Default is [support@opentracker.net].
password Your password.
ticketId A ticketId can be used to provide credentials with an expiring token. A ticketId can be used instead of a login/ password combination. Further information can be found here.
site The site for which to display data. Default is [www.opentracker.net].
locale The locale parameter is an identifier for a particular combination of language and region (e.g. en_US) and determines the format of the data returned. A list of locales can be found here.
dataType The dataType parameter determines the format of the data returned. Values can be [json] | html | jsondatatable | jsonjqgrid
ignoreLocale Display columns without language translation. Boolean. [false]|true.
dateFormat The dateFormat parameter determines the format of dates returned. An example is dateFormat=yyyy-dd-MM. The syntax can be found here.

Examples

To search for all visits to www.opentracker.net with ip address '123.123.123.1'.
HTTP GET/ POST: view_ip_number.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&filterByIp=123.123.123.1&offset=10&limit=10
To search for visits within a specified ip address range use the format '52.*.*.*':
HTTP GET/ POST: view_ip_number.jsp?filterByIp=52.*.*.*&limit=2

Response

This last example returns a json array with 'n' entries starting from the specified offset formatted as:

				










{ "resultsList": [
{
"error":"No results"}
]
}



				

Errors

If errors are encountered, the first encountered error will be returned of form "Error: exception: message

Error: java.lang.RuntimeException: Login/ site combination is not valid
-------------

*.*.*.*
123.123.123.123 4th
123.123.123.* 3rd
123.123.*.* 2nd
123.*.*.* 1st 
*.*.*.* -> everything

** trivial ** .. (subset of session table, sessions with ip# in it) i'm looking for the last 40 (limit) visits of people who have an ip number ordered by date

** important ** .. (subset of session table, sessions with ip# in it) i'm looking for the last 40 (limit) visits of people who have an ip number 123.123.123.* ordered by date
.

Index on:
..
...
....
.....


ALTERNATIVE FOR NON DISCRETE SETS (finite)
select * from sessions where ipnumber between x and y order by date; (using filesort)
get * from .- cf where ipnumber between x and y -> list[10,000]; [list ordered by value .] garanteed < 10,000;

memory / key.column value size  = number in list (/2 safety factor).

-> put into cassandra  .


-> select from cassandra list limit 10,000;


** not important ** usecase0a: ... i'm looking for the last 40 (limit) visits of people who are visiting with a search term alphabetically ordered


buckets are used for recency, so that if a key has changing properties in time the bucket can solve this problem. buckets are ordered by date.

** important ** ..  I want to search everyone with first* -> list' of sessions with first*
strat 1: ** important ** .., ..  I want to search everyone with first*, ordered by date -> list' of sessions with first* 
doesnt solve strat 2: ** important ** . { secondary column . } I want to search everyone with first*, ordered by date -> list' of sessions with first* (might be memory problem unsolvable)

doesnt solve strat 2: ** important ** .. { secondary column . } I want to search everyone with first*, ordered by date -> list' of sessions with first* (you cant search on  -> so you cant search on the secondary column)....

hard to solve

-----------------
list' = mechanism that guarantees no memory overload with large lists. So we have a java list that has no memory contraints.
if the list is 10,000 but you get 1000, you'll miss the most recent. (maybe with a bucketing system you can solve this) 
-----------------


-------------
usecase1: i'm looking for a machine id's search visits -> . || get all visits for the machine id and elimenate the non search visits 
usecase2: i'm looking for a machine id's search visits one year ago -> one index ->  get all visits for the machine id and elimenate the non search visits and within time period

-------------
-------------
usecase3: i'm looking for a searched visit_id for a site -> one index . || use session cf and flag on condition its a searcg visit. (deprecate)
-------------
-------------
usecase4: i'm looking for a machine_id with this visit_id -> not available query
-------------
-------------
or deprecate offset, and just use next tokens. so implement a next token.
offset: we just iterate through. eg offset = 300, limit = 100 -> we need to iterate through first 301 keys, and use 301 - 400, preferably no memory problems = memory / key size = iteration size. 
-------------

We would love to hear your feedback. Please use the facebook comment box below