I am attempting to retrieve a few columns from a Feature Layer that was created from an Excel worksheet and is now maintained through Survey 123 using the inbox feature.
I have added a Webhook and pointed it to a boilerplate PHP that captures the post and sends the data to me via email. The JSON makes sense more or less, but I am having trouble understanding the linkage to the feature layer.
In the JSON I have a Global Id but this does not seem to tie to the Item Id for the Feature Layer and then I have an FID which, while I am not far along enough to be sure, expect will tie to the record.
My ultimate goal is to retrieve four columns from the Record updated to use in an API Post to another system.
Is this the right documentation for this query ?
http://gisweb.dotd.la.gov/arcgis/SDK/REST/index.html?fsupdate.html
TIA -
Hello @JeffSilberberg,
There is no linkage between the webhook and the feature service. When a webhook is configured with a Survey123 survey, when Survey123 submits a response it sends an applyEdits request to the feature service, then sends a seperate request to the payload URL for the feature service with the same JSON send to the applyEdits endpoint.
The /updateFeatures REST API resource would be used if you wanted to update the data in the feature service. If you just need the data that exists in the record you can use the /query API endpoint.
Thank you for the response. It is the Query API endpoint that I am attempting to use, but I am trying to query five fields in the row (or is it layer) that a Survey 123 user just updated.
The Survey 123 works fine, the Webhook fires correctly, and I see the JSON as expected in the target of the Webhook URL which is for now trapJSON.php.
The next step in the flow is to retrieve some static information from the row being updated and use the data to reset the related line crossing analytics in a video system.
I am struggling with two things here -- based on the Feature Service Layer Query documentation at the link you and others have provided.
Thank you for your assistance here -
PS: the outfields=a,b,c,f makes sense to me if I can ever get that far-
I got this to work thanks to a youtube, the Online API interface manual versus the Enterprise one, and a lot of trial and error --
Survey 123 Sends update --
WebHook fires API --
API Queries Feature Layer where 1=1 & ObjectId = FID & outFields= a, b, c, d
API Interfaces with Camera AI to Reset it's Analytics where xid = c.
Done !