inReach Portal Connect

5310
14
09-17-2019 12:00 PM
by Anonymous User
Not applicable

How do I get my data from Garmin devices to ArcGIS online through Garmin's inReach Portal Connect?

Tags (3)
0 Kudos
14 Replies
SURENDERREDDYKONATHAM
New Contributor

Thanks Ken,

i have hosted your function on my Azure portal and tested on inReach portal and test successful. i have replaced with my own feature service with same structure of fields, but i am getting below error, any idea ?

0 Kudos
KenGorton
Esri Contributor

Hi Surenderreddy Konatham,

This may happen if your Azure function's Authorization level is set to Function or Admin which would require inReach Portal Connect to send authentication credentials with each request. If this is required it may be possible for you to implement that but I do not know what would be required to do so.

Switch auth level to Anonymous by going to Integrate settings in your Azure function:

then set Authorization level to Anonymous:

and click save.

Also, I found and corrected an error in my code so please update your function. While verifying this behavior this morning I noticed I had left off a rather important element to the feature json that gets sent to the feature layer - spatialReference (DOH!!!). InReach sends data in WGS84 (wkid 4326) while ArcGIS Online feature layers use, by default, web mercator (wkid 102100). If incoming features include spatialReference info other than web merc, the feature layer will project them correctly to web merc and store them. Otherwise it assumes the features are already in web merc and does nothing to the geometries resulting in incorrect placement for inReach features.

I have updated my code on GitHub.

Ken

0 Kudos
SURENDERREDDYKONATHAM
New Contributor

Hi Ken,

I got your latest code updates from GitHub.

I tried using both the Authorization level options (Anonymous and Function), but no luck, Please refer below snapshot. but i got success with your feature service, is there any security configurations or any other settings i need to look on my feature service?

0 Kudos
KenGorton
Esri Contributor

The example on the right makes perfect sense. You get a 401 (Unauthorized) error because the Azure function has an authorization level of 'Function' meaning it restricts requesting clients to only those sending proper credentials. inReach Portal sends no such credentials so the request fails. This is why you must set the function's Auth level to 'Anonymous'.

Regarding the left example, is your feature layer shared with everyone? The code I shared assumes an unprotected destination feature layer. Thus it does not send a token or any other kind of credentials. This is entirely possible to enable. To do so follow guides and examples for our .Net developer API. That being said, I suspect the issue is something else given the error returned. When I unshared my feature layer and attempted to send a test message from Portal Connect, the error returned was a 400 (Bad request).

Can you confirm the destination feature layer is of the correct schema? If not you can create a new one in your portal by using mine as a template.

Can you share the url to your feature layer? If you are reluctant to post it in this public forum thread but are willing and able to share your feature layer with me you may email me directly at kgorton@esri.com. I will be happy to have a look.

0 Kudos
SURENDERREDDYKONATHAM
New Contributor

Ken,

 

I got success with my new feature service, thank you so much.

 

I really appreciate your support on this issue.

 

Suren

0 Kudos