Aerohive Migrated Content

Expand all | Collapse all

Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

  • 1.  Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-06-2018 17:24

    I'm using the following method in Postman to yield results for what I believe to be the same time range as the HiveManager report I'm comparing to. From there I'm searching the API results for a corresponding username from that report and adding up the usage. Are the usage results in the API in bytes? Should I be going about trying to do this in another way?

     

    https://hmng-prod-va2-cm-01.aerohive.com/xapi/v1/monitor/clients?ownerId=****&startTime=2018-11-25T00:00:00.000Z&endTime=2018-12-02T23:59:00.000Z&timeUnit=DAY&page=0&pageSize=100000



  • 2.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-06-2018 18:21

    I'm looking in to this for you as I don't know off hand. I've set up a lab but that will take time to generate the data. I'm also reaching out to the rest of the team to see if anyone knows or if we have this documented somewhere.



  • 3.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-06-2018 21:23

    Thank you Sam. Also forgot to mention I'm comparing data from that API method to the Top Wireless Users report from HiveManager if that helps. I don't know if you would be able to access our reports but if you can that might help you try to replicate my scenario if you're going that route. Otherwise please let me know if I can provide any further clarification on anything.



  • 4.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-06-2018 21:25

    Would you be able to add me as an external user with the email slynn@aerohive.com? That way I could take a look at the reports you have set up.



  • 5.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-07-2018 15:38

    Sam - we added you as an external user. Please let me know if you need anything else from my end.



  • 6.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-11-2018 16:33

    Hi there - since gaining access to Hivemanager myself it has become clearer what we are after - which is the data that is being displayed in the Top Usage widget of the Dashboard->Summary section of Hivemanager. This needs to be monthly usage and preferably emailed like the other reports can. However, I don't see a means to filter by month when creating a report.

     

    Are there any endpoints that aren't disclosed in the documentation that might get us access to the usage data in the Dashboard?

     

    Is there any way other way I can get a monthly usage report setup to be emailed like the other reports?



  • 7.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-11-2018 17:12

    We currently don't have monthly reports available, but I can submit a feature request for you to get this added in if you'd like?



  • 8.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-11-2018 18:00

    Sam - please do add the request. Also - can you confirm there would be no other means to get at that data in that Dashboard widget via the API?



  • 9.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    This message was posted by a user wishing to remain anonymous
    Posted 12-11-2018 19:06

    The usage returned in the JSON response to your API request is given in bytes. You should be able to use the endpoint you referenced above to retrieve the client usage for the specified time range. You mentioned above that you saw discrepancies between the usage shown for users in reports and the usage calculations you made by summing client usage where usernames matched in order to obtain usage for users. I would like to know if you are seeing any discrepancies between the client usage you see in the reports and the JSON responses from your API requests. Could you test whether the client usage that is being reported by the API request matches in the "Top Usage" widget?



  • 10.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-12-2018 13:19

    Hi Brian - thanks for the clarification on the usage metric. In regards to the API response and the "Top Usage" widget I can tell you the two most definitely do not match up. The results I'm seeing in the API match up to the Historical data found under Monitor->Clients. If I set that to show for the last 24 hours and then call the API for that same time range I see usage data match up consistently. So I'm not sure how that Top Usage widget is being populated but it appears to be doing something differently than what that is being returned via any of the API calls. And since there is no way to get a report of monthly usage by users I would still be interested in knowing whether there is any way to do this via API so please let me know if you have any other thoughts or questions for me on this.

    Thanks again



  • 11.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    This message was posted by a user wishing to remain anonymous
    Posted 12-12-2018 15:55

    I just wanted to clarify that you are seeing discrepancies between the client usage shown in the "Top Usage" widget and the API responses (as opposed to the users' usage). If you are seeing that the client usage differs, how long does it take for the client usage shown in the "Top Usage" to diverge from the result returned by your API requests? I would like to know this to determine whether we should first investigate whether the data you are getting back from the API requests is incorrect or if we just need to focus on the method used to calculate the users' usage.



  • 12.  RE: Hello, My overall goal is to use the API to come up with monthly usage data for the top 20 users. I have connected to the API and am seeing data returned but with discrepancies.

    Posted 12-13-2018 14:37

    Brian - there definitely looks like a discrepancy. And after looking further into the data in the Top Usage widget we're not even sure how accurate of a representation that is. It seems like the usage there is overstated Do you know how that data is gathered to be displayed on that Top Usage widget? I would also be curious to hear your thoughts on why the data in that Top Usage widget does not match up to what is being displayed under Monitor->Clients when both are set to pull from users and the same time frame. While the monitoring appears to be more real time it does offer a historical option which I would assume should match up when looking at say a previous day.