Is it possible to send a picture through the REST API? Want to move a picture from one feature service to another.
I'm trying to incorporate this into Integromat. A user will submit a picture via Survey123, hits integromat, runs REST to take the picture and update another feature service with the picture
It has been a while since my experimenting. I'll try to dig up my code. What you can do is explore the REST API on AGOL and examine the returned html and json. This should give you an idea of the coding needed and the process to follow.
The link to a feature should look something like:
https://<services>.arcgis.com/<account>/arcgis/rest/services/<feature>/FeatureServer/<layerID>?token=<token><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
The link to query attachments (I've used "OBJECTID > 0' for the definition expression:
https://<services>.arcgis.com/<account>/arcgis/rest/services/<feature>/FeatureServer/<layerID>/queryAttachments?token=<token><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
The links to update and add attachments will return a multi-part form:
https://<services>.arcgis.com/<account>/arcgis/rest/services/<feature>/FeatureServer/<layerID>/<parentID>/updateAttachment?token=<token> https://<services>.arcgis.com/<account>/arcgis/rest/services/<feature>/FeatureServer/<layerID>/<parentID>/addAttachment?token=<token><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Haven't had too much luck with it. Have any examples?
I've updated some attachments, so you should be able to move them. Start by checking: Query Attachments. There are links on the side of the page for Add Attachments and Delete Attachments.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.