Lat long not returned in lastsession from REST API


#1

Hello. I’m trying to find out my device’s timezone.

I could do this by tearing down my VPN and using the hologram modem location command or the Python SDK equivalent. But it is very very slow, and are not 100% reliable-- sometimes they get stuck and just won’t work for me until I do something drastic like rebooting.

I tried using a reverse IP lookup on your address, and that’s failing too-- apparently the internet thinks all the hologram devices are on the Isle of Jersey.

So now I’m trying via the REST API. From my Linux device, I do:
curl https://dashboard.hologram.io/api/1/devices/

And I get back a JSON object which contains a lastsession, but there’s no lat and long there. It just has (replacing identifying info with “…”)
“lastsession”: {
“linkid”: “412700”,
“bytes”: “0”,
“session_begin”: “2018-12-04 03:08:46”,
“session_end”: “0000-00-00 00:00:00”,
“imei”: “…”,
“cellid”: “…”,
“tadig”: “USAW6”,
“lac”: “…”,
“network_name”: “T-Mobile USA, Inc”
}

Previous messages here imply that there should be lat and long lines here.

Alternative suggestions are welcome too.


#2

Right now we only return the location on single calls so if you do /devices/id then it will work.
We’re working on adding this to bulk calls in the near future


#3

Sorry, I just omitted the device ID, org and API key, it was there, and I still don’t get lat/long.


#4

Are you on the pro plan?


#5

Yes. This is the modem “hub08” device Id 164021


#6

Hmm, so you’re actually making a call to the URL: /devices/<deviceid> ?
I’m able to see location info on there


#7

Yes, that’s what I did.


#8

What happens if you stick ?orgid=<orgid> at the end of the URL where orgid is the org for that specific device?
Might have a bug where it’s looking at the wrong org for proplan


#9

So, I see a “personal org id” and that may not be the same as the full org id. What I’m actually concerned about is that I only want to ship a restricted user’s credentials on the units so if one is stolen, they can’t go commissioning or decommissioning our other modems or anything crazy. As an experiment, I’ll try our full org ID later on.

If there’s no security solution to keep the credentials sane, I might have to implement from our backend, but I’d prefer not to…


#10

Use the orgid that the dashboard says when you go to “Organization Settings.” It’s also listed on the device output there. You shouldn’t have to do that though. We’ll take a look and see if there’s a bug.

Definitely understand about the security concerns. Might make sense to create different orgs for everyone or we have some user permissions that might help.

Feel free to reach out to our support email at support@hologram.io and we might be able to help with your specific use case. I think we’ve helped customers in a similar situation.


#11

I’ve tried both the “personal org ID” and the graftworx org ID, and both of them work, and neither one gets me lat/long. I’ve verified it’s on the professional plan. Is there anything else I can try? Or is there something else you can do from your end?

Thanks,
– Jim


#12

Hey Jim,

I took a look at your Personal Org and noticed that that wasn’t on the professional plan. Since the API Key is linked to that it seems like that was what was missing. I tested getting location for your organization and it works for me. Can you please confirm that its working on your end.

Best,
Maiky


#13

Hi Jim,
That bug is now fixed so you should be able to see location on any org with a pro plan regardless of whether your personal has the pro plan.
BTW, little mistake in @Maiky’s post above. The API keys are tied to your user and so your one key can get to all orgs that you have access to.