AnsweredAssumed Answered

MS Flow HTTP POST to update Feature Service??

Question asked by ddoring_salem on Jun 24, 2019
Latest reply on Jul 12, 2019 by ddoring_salem

I have set up a Microsoft flow to trigger when rows in my Smartsheet are updated. I followed this tutorial on how to update values using the ArcGIS REST API. Everything works as it should using Postman. I noticed however that the ArcGIS Rest API is expecting multipart/form-data including key value pairs for f:json, a valid token, and then the updates. Postman handles this natively by selecting the form/data option for the body and automatically creates boundaries. MS flow apparently does not handle multipart/form-data natively. How do I structure my body to pass a valid POST request to the API to update my feature service? Screenshot of MS Flow HTTP Post below. Also below is the successful POST from Postman using the exact same data. I should note that this feature service is shared with editing enabled, which explains my missing token key value pair.

 

 

From Postman Console. This successfully posts:

Request Header:
User-Agent:"PostmanRuntime/7.15.0"
Accept:"*/*"
Cache-Control:"no-cache"
Postman-Token:"8988b891-ad8f-4e9f-8be0-965ad2711ecc"
Host:"services.arcgis.com"
accept-encoding:"gzip, deflate"
content-type:"multipart/form-data; boundary=--------------------------113767685070943500397041"
content-length:467
Connection:"keep-alive"
Request Body:
f:"json"
updates:"[ { "attributes" : { "objectId": 3, "MissionDate" : "2019-06-27T07:00:00.0000000", "MissionName" : "Waste Transfer Facility Promo Shots", "Status" : "pending_review" } } ]"

Outcomes