Select to view content in your preferred language

Loading an API response in JSON to Map Viewer.

1053
5
12-17-2021 06:00 AM
Boyang_Wang
Frequent Contributor

I am using an API for fleet management that responds in JSON with vehicle coordinates. This is how the JSON looks like:

https://api.silentpassenger.com/rest/v2/help/operations/GetDataPoints#response-json

I would like to draw these coordinates as points in ArcGIS Online Map Viewer. Do I need to use another API to convert JSON to ArcGIS compatible formats such as CSV, GeoRSS or KML?

Thanks!

Tags (3)
0 Kudos
5 Replies
RussRoberts
Esri Notable Contributor

Yup you will need to convert it. I would recommend CSV or GeoJSON in the New Map Viewer.

0 Kudos
Boyang_Wang
Frequent Contributor

Is there an converter API ready to use for this purpose? I do not have web server so I think I cannot develop and deploy a converter by myself.

What about GeoEvent Server? Can that server be used for this purpose?

0 Kudos
Deputy_Rico
New Contributor

With regards to the initial problem, I am also curious as to what program or application I should use to convert an API that is in JSON format into a GEOJSON format in order to connect and upload dynamic data into Map Viewer.

0 Kudos
Boyang_Wang
Frequent Contributor

My solution was creating a hosted feature service, using Python to convert JSON to CSV and cursor to write to feature service every 10 seconds. I am working in Enterprise environment, so I am not sure if this method will drain the credits in ArcGIS Online environment.

0 Kudos
Deputy_Rico
New Contributor
Thank you! I will give this a try and see how it goes with the credits.
0 Kudos