POST
|
Hi, I'm trying to add data to a feature service upon submission of a survey123 form. To do this I'm using Power automate (MS flow), however when making the api call to the AddData api I'm getting the response "Not found". The request I'm making is below: https://services.arcgis.com/XXXXX/arcgis/rest/services/service_XXXX/FeatureServer/0/addFeatures?token=MYTOKEN body: { "f": "json", "adds": "[{\"geometry\":{\"x\":0,\"y\":0,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857}},\"attributes\":MY GEOMETRYHERE}}]", "token": "MY TOKEN", "rollbackOnFailure": "true" } Reponse details: The error details I have: status code: 404 X-ArcGIS-Correlation-Id XXXX X-ArcGIS-Instance MTSDS_Web_IN_11 Access-Control-Allow-Origin * X-Cache Error from cloudfront X-Amz-Cf-Pop AMS54-C1 X-Amz-Cf-Id HDibQhp2qo3c_YhMMxnFLMVw_REW8Lpx3E5tmiAWKw7O7XAjSpKpGA== Date Wed, 05 Feb 2020 11:23:52 GMT Server Microsoft-IIS/10.0 Via 1.1 38f6d324a75dff585b0ce25920fd4bda.cloudfront.net (CloudFront) X-Powered-By ASP.NET Content-Length 1245 Content-Type text/html Response body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>404 - File or directory not found.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;} fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF; background-color:#555555;} #content{margin:0 0 0 2%;position:relative;} .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} --> </style> </head> <body> <div id="header"><h1>Server Error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>404 - File or directory not found.</h2> <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3> </fieldset></div> </div> </body> </html> If I follow the same link in the browser it seems to function correctly? Any ideas?
... View more
02-05-2020
03:29 AM
|
0
|
2
|
609
|
POST
|
Okay, My apologies I didn't realise that if they were showing in the inbox (i.e when I refresh the inbox without a where clause) they are actually ready for offline use i.e downloaded to the device. Thanks! Tom.
... View more
08-19-2019
09:40 AM
|
1
|
0
|
629
|
POST
|
Hi Brandon thanks for getting back to me. That's what I currently use but as far as I'm aware I can only download one survey at a time through the inbox. Is there a way to download all the surveys or are all the surveys downloaded automatically when you activate the inbox?
... View more
08-19-2019
01:03 AM
|
0
|
1
|
629
|
POST
|
Hi, Is it possible to bulk download all surveys completed for a given area/entire survey dataset? Currently my workflow involves downloading each survey individually and saving it as a draft so it can be edited offline later, However this could quickly become laborious if potentially hundreds of survey points need to be available to edit, similar to downloading a map in collector for offline use. Thanks, Tom.
... View more
08-16-2019
08:21 AM
|
0
|
4
|
723
|
POST
|
First create a blank flow like this with no JSON schema: add the HTTP post url from the above photo as the webhook URL: Save it and click test in MS Flow Click ill perform trigger action When your page looks like this, send a test survey.: You should then get this: Click the when a http request is received to see the payload. Copy this payload to the generate payload button in flow: Paste here: And now your custom webhook is setup. It should auto recognise the various elements within the Survey e.g User portal etc.
... View more
07-29-2019
02:59 AM
|
1
|
1
|
1660
|
POST
|
No worries, so when you setup that flow originally leave the JSON payload blank. set up one more step (it can be anything just so it will run). Then test the flow. When you test it you can click on the "when a http request is received" box in flow and it will give you the payload that Survey123 sent to the URL copy this payload then go back to edit click use sample payload to generate JSON payload and paste in the JSON from the test.
... View more
07-23-2019
07:29 AM
|
0
|
3
|
1660
|
POST
|
Hi Eric, What do you need to do I'm happy to help. Initially you need to create a "when a http request is received" trigger which will create a url end point which you can enter into Survey123 website > your survey> Survey settings > webhooks > add webhook and add in that generated URL as the webhook url ticking on the various options. If you need more help feel free to drop me a message.
... View more
07-23-2019
07:06 AM
|
0
|
5
|
1660
|
POST
|
Hi Marco, I also had this issue, the way that I resolved it was to use the "When a Http request is received" flow module and set up the webhook via the Survey123 website manually. This module generates a similar URI to the automated one when you set it up in flow in the pre setup manner. Once you generate a sample payload its essentially the same as your first attempt (although you can expose a bit more information with the custom webhook by the looks of it). Hope this helps.
... View more
06-18-2019
04:02 AM
|
1
|
7
|
1660
|
POST
|
I've located the issue, The issue was with my original formula for some reason. The formula worked in AGOL but wouldn't in collector. When I used your adapted version of Xanders formula it worked fine. Incase its something relevant here is the formula i was using that wouldnt work on the android version: var PointGeometry = Centroid(Geometry($feature)); var ArcadeX = PointGeometry.x; var ArcadeY = PointGeometry.y; var ArcadeSr = PointGeometry.spatialReference.wkid; var Latitude, Longitude; function AuxSphereToLatLon(x, y) { Console("Converting..."); //Conversion based on http://dotnetfollower.com/wordpress/2011/07/javascript-how-to-convert-mercator-sphere-coordinates-to-latitude-and-longitude/ var rMajor = 6378137; var shift = PI * rMajor; Longitude = x / shift * 180.0; Latitude = y / shift * 180.0; Latitude = 180 / PI * (2 * Atan(Exp(Latitude * PI / 180.0)) - PI / 2.0); } if (ArcadeSr == 4326) { Console("4326 Spatial Reference - No Conversion Necessary"); Latitude = ArcadeY; Longitude = ArcadeX; } else if (ArcadeSr == 102100) { Console("102100 Spatial Reference - Conversion Necessary"); AuxSphereToLatLon(ArcadeX, ArcadeY); } else { Console(ArcadeSr + " Spatial Reference is not supported - currently works with Web Maps where the basemap is in WGS84 (4326) or Web Mercator Auxiliary Sphere 102100"); } function ReturnLatLong(Long, Decimals) { return Text(Round(Long, Decimals)); } ReturnLatLong(Longitude, 7); (used a similar one for Lat) so i have two seperate vars.
... View more
02-22-2019
05:32 AM
|
1
|
0
|
2122
|
POST
|
I've also tried it on iOS where I can copy the url and its giving arcgis-survey123:///?itemID=(MYSURVEY)&field:incoming=(MYID)&field:TreeNumber=1&field:Tree_Loc_X=0&field:LandParcel=(MYLANDPARCEL)&field:Tree_Loc_Y=0
... View more
02-22-2019
05:06 AM
|
0
|
1
|
2122
|
POST
|
Hi Mark, Thanks for getting back to me, Im on the latest version of the beta Collector for ArcGIS for android and I'm not getting the option to copy the link address by pressing and holding the link in Collector. I've tried it on a couple of different tables and getting the same issue. Any ideas? Tom.
... View more
02-22-2019
03:59 AM
|
0
|
2
|
2122
|
POST
|
Thanks very much Mark, I've managed to get to the point of having XY returned but I can't get it to pass to Survey123. The connect works when I'm using the desktop version of S123 a web map but doesn't work via collector. I'm using the most recent version of Collector but it just passes 0. Any ideas? Tom.
... View more
02-20-2019
01:27 AM
|
0
|
4
|
2122
|
POST
|
Hi, I'm trying to pass the X and Y co-ordinates of a point location to Survey123 through collector. When I test it via the online webmap it works perfectly however when using Collector (the beta aurora version) it passes 0 to the field in Survey123. Is arcade currently not supported in the Beta version of Aurora? or is there some other problem? Thanks, Tom.
... View more
02-19-2019
02:56 AM
|
0
|
6
|
2953
|
POST
|
Thanks I will post it there as well. I'm using the latest build of Arc Collector (Beta) for Android.
... View more
02-14-2019
07:35 AM
|
0
|
0
|
216
|
Title | Kudos | Posted |
---|---|---|
1 | 07-29-2019 02:59 AM | |
1 | 02-22-2019 05:32 AM | |
1 | 08-19-2019 09:40 AM | |
1 | 06-18-2019 04:02 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|