AnsweredAssumed Answered

MS Flow HTTP POST to update Feature Service??

Question asked by ddoring_salem on Jun 24, 2019
Latest reply on Dec 6, 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:
accept-encoding:"gzip, deflate"
content-type:"multipart/form-data; boundary=--------------------------113767685070943500397041"
Request Body:
updates:"[ { "attributes" : { "objectId": 3, "MissionDate" : "2019-06-27T07:00:00.0000000", "MissionName" : "Waste Transfer Facility Promo Shots", "Status" : "pending_review" } } ]"