Pass data fron the AP to the cloud

  • 1
  • Question
  • Updated 2 years ago
I have an AP model: AP121 and i understood that i can get data from that AP directly to my cloud.
So my question is how? i can't find any documentation about this

Thanks
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Jenia,

What do you mean by "my cloud"?

Nick
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
Sorry, i will try to explain my self better.

So as i understand Aerohive AP's can send to HiveManager data about connected clients like mac address, location, power of the signal and etc.

So i have 2 questions:
1. Can they send the data to server of my choice instead of the HiveManager?
2. If yes, how?, examples, documentation something that can help me with this.

Or maybe i miss understood and i need to use the Aerohive developer, if so can you refer me to some documentation about this?

Thanks,
Jenia
(Edited)
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Hi Jenia,

No, this is not possible as you envisage it.

You would be doing this at the wrong level of abstraction having the APs report directly to your service/application somewhere regardless. The communications between HiveManager and HiveOS are a private implementation detail.

To get the information you are after, you should instead use the APIs offered by HiveManager-NG to get access to the information that you want.

Take a look at: https://developer.aerohive.com/

It is possible to query information directly from an AP via its CLI over SSH or SNMP, if you must. The information available via SNMP is currently limited in scope. I wouldn't look in to doing this though.

Regards,

Nick
(Edited)
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
Hey Nick, 

I tried to follow the instructions in the developer portal, but didn't succeed to send any request to the api, the response that i receive is "404 Not Found".

I'm sending the request using Postman
URL- https://cloud-ie.aerohive.com/xapi/v1/monitoring/devices?ownerId=<id><br>Headers-<br>Authorization:&nbsp;Bearer <generated token*><br>X-AH-API-CLIENT-ID: <client id taken from developer.airohive.com><br>X-AH-API-CLIENT-SECRET: <secret key&nbsp;taken from developer.airohive.com><br><br>*-the token was generated in the&nbsp;HiveManager-NG when i added the client in the API Token Management<br><br>What is wrong with my request?<br><br>Thanks,<br>Jenia
Photo of Andrew Garcia

Andrew Garcia, Official Rep

  • 368 Posts
  • 120 Reply Likes
The ID in the URL needs to be your VHM number, which you can get from the About tab in NG.

You also need to define a Redirect URL in your app settings in the developer portal,   and add that URL to your postman request as X-AH-API-CLIENT-REDIRECT-URI
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
And why i need the Redirect UR?
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
I found something about Webhooks, where i should add them?
In HiveManager?
Photo of Andrew Garcia

Andrew Garcia, Official Rep

  • 368 Posts
  • 120 Reply Likes
Right below the place where you created the API token in NG is a tab called API Data Management. Set up your webhook there.
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
After i connected it to the webhook the AP send's very little data.
Is this a known issue? 
(Edited)
Photo of Jenia Sakirko

Jenia Sakirko

  • 7 Posts
  • 0 Reply Likes
And can this be done using the HiveManager Online?
Define the webhook in the HiveManager Online or should i connect the HiveManager NG to the HiveManager Online?
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
You must move your APs over to HM-NG from classic HM to be able to use these APIs. You can use the same licence key(s) in both.
(Edited)