Analytics

Analytics gives you a detailed analysis of all the clients that tried to log in to a particular AP based on their location. There are two types of Analytics: Get Association Analytics and Get Visibility Analytics. Get Association Analytics gives us all the information of all the users that were associated with an AP for a particular duration and location. Get Visibility Analytics gives us the time duration from when a user was connected to an AP for a particular duration of last 60 days along with the location.

API Calls

/V5/analytics/associationdata/{startdate}/{enddate}

/V5/analytics/visibilitydata/{startdate}/{enddate}

Get Association Analytics

Description This API is used to fetch the association analytics data for a specified time period
within the last 60 days and for a specified location from the Mojo Server or the Arista Cloud Services.
Note: This API accepts the start and end time in milliseconds(epoch).
However, only the date part of the timestamp is considered and the minutes and seconds are ignored.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
To call this API, the Association Analytics feature must be enabled on the WiFi/WIPS Server.
Syntax
GET <Base_URL>/analytics/associationdata/{startdate}/{enddate}?locationid=<value>&format=<value>&tohashmac=<value>

Here,

  • startdate

    It is the time in milliseconds indicating the starting date from which the association analytics data must
    be fetched. For example, 1384194600000.
    Ensure that the start date is prior to the end date and not more than 60 days prior to the current date.

  • enddate

    It is the time in milliseconds indicating the date until which the association analytics data must be fetched.
    For example, 1386786600000.

  • locationid

    It is the parameter specifies the ID of the location for which association analytics has to be fetched.
    To fetch the appropriate location ID you can use Locations call.

  • format

    It is the parameter that specifies the format in which you want to fetch the association analytics data.
    There are two formats in which you can fetch the association analytics, CSV, and BINARY.
    The default format is CSV.

  • tohashmac

    It is the parameter that takes a boolean value.
    The default value is false indicating that the hexadecimal MAC addresses will be displayed in the association analytics.
    If the field is set to true, the MAC addresses will be hashed. It is mandatory to pass this URL parameter.

Sample code
GET https://training.mojonetworks.com/new/webservice/v5/analytics/associationdata
/1384194600000/1386786600000?locationid=-1&format=”CSV”&tohashmac=false
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200. The response body contains a partial URL to access the generated association analytics in the requested format. This partial URL must be appended to:

https://<Mojo_Server_IP>/new/

 

Where <Mojo_Server_IP> is the IP address or FQDN of the Mojo Server. If you are using Mojo Cloud Services,
then use the URL provided by Mojo Networks Support team instead of the server IP. A sample response is as follows:

webservice/sfiles?id=d7d2a5ca-1ca4-4080-87a7-7b50fea4dca3&dwnlfnpre=
Association_Analytics

 

The resulting URL to access the association analytics is as follows:

https://training.mojonetworks.com/new/webservice/sfiles?id=d7d2a5ca-1ca4-4080-87a7-7b50fea4dca3&dwnlfnpre=Association_Analytics

Get Visibility Analytics

Description This API is used to fetch the visibility analytics data for a specified time period within the last 60 days
and for a specified location from Mojo Server or Arista Cloud Services.
Note: This API accepts the start and end time in milliseconds(epoch).
However, only the date part of the timestamp is considered and the minutes and seconds are ignored.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
To call this API, the Visibility Analytics feature must be enabled on the WiFi/WIPS Server.
Syntax
GET <Base_URL>/analytics/visibilitydata/{startdate}/{enddate}?locationid=<value>&format= <value>tohashmac=<value >
  • startdate

    It is the time in milliseconds indicating the starting date from which the visibility analytics data must be fetched.
    For example, 1384194600000. Ensure that the start date is prior to the end date and not more than 60 days prior to the current date.

  • enddate

    It is the time in milliseconds indicating the date until which the visibility analytics data must be fetched.
    For example, 1386786600000.

  • locationid

    It is the parameter specifies the ID of the location for which visibility analytics has to be fetched.
    To fetch the appropriate location ID you can use Locations call.

  • format

    It is the parameter that specifies the format in which you want to fetch the visibility analytics data.
    There are two formats in which you can fetch visibility analytics, CSV, and BINARY. The default format is CSV.

  • tohashmac

    It is the parameter that takes a boolean value. The default value is false indicating that the hexadecimal MAC addresses will be displayed in the visibility analytics.
    If the field is set to true, the MAC addresses will be hashed. It is mandatory to pass this URL parameter.

Sample code
GET <Base_URL> https://training.mojonetworks.com/new/webservice/v5/analytics/visibilitydata
/1384194600000/1386786600000?locationid=-1&format=”CSV”&tohashmac=false
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200. The response body contains a partial URL to access the generated visibility analytics in the requested format. This partial URL must be appended to:

https://<Mojo_Server_IP>/new/

 

Where <Mojo_Server_IP> is the IP address or FQDN of the Mojo Server. If you are using Mojo Cloud Services, use the URL provided by Mojo Networks Support team instead of the server IP. A sample response is as follows:

webservice/sfiles?id=49331b8a-1f4c-4c82-a70a-593afe6c1695&dwnlfnpre=
Visibility_Analytics

 

The resulting URL to access visibility analytics is as follows:

https://training.mojonetworks.com/new/webservice/sfiles?id=49331b8a-1f4c-4c82-a70a-593afe6c1695&dwnlfnpre=Visibility_Analytics