Select to view content in your preferred language

Connecting to feature layer through rest api

469
1
01-10-2023 10:01 AM
ChristopherKreuter
Emerging Contributor

I am trying to connect to a feature layer to submit survey 123 entries into a database. I am testing this with postman but am unable to find the right api call to connect to the database. 

0 Kudos
1 Reply
John_Spence
Frequent Contributor

Not sure how you are configured there. Survey123 (in the ArcGIS Online builder) connects to hosted feature services and will not connect to a on-premise/cloud hosted database. Don't get me wrong, the hosted feature service is in a database, but not the database type I am assuming you are trying to do.

What you can do is 1) sync data from our on-premise database by pulling from AGOL and updating your data via the REST service data or 2) creating a process that would download the hosted feature service as a feature class and updating the database or 3) if you have portal, setting up a sync between AGOL and Portal to pull in that rest service. Depending on how much data is flowing, I would probably skip that last one as it can be problematic and cause you to spend more hours than its worth trying to hunt it down.

 

For answer 1, you would want python to query the online service (Survey 123) and get the latest and greatest, and then either directly update your database via direct SQL connection or push the updates in to a REST service connected to the dataset you were intending to use. For answer 2, you can use something like this https://github.com/wagisdev/ExtractService

0 Kudos