Skip to main content
Solved

Delete attachments from AGOL using the API and httpcaller FME2019

  • July 4, 2024
  • 2 replies
  • 194 views

beetriz
Contributor
Forum|alt.badge.img+5

Hello,

We are trying to manage changing attachments on a feature layer on ArcGIS Online using FME. We can successfully read, compare, and add attachments using a combination of HTTP Callers and Python Callers. However, we are having difficulties deleting attachments that are no longer relevant. The easy solution would be to delete the entire record but we are trying to avoid that.

Has anyone had success at using the deleteAttachments POST request outlined in the ESRI’s api guide.

https://developers.arcgis.com/rest/services-reference/enterprise/delete-attachments/

Or has anyone found another way of managing attachments?

Thanks,

Best answer by beetriz

Thanks Todd! This worked great!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • July 4, 2024

Hi,

Here is an example of it in action in the attached 2019.1 workspace. I created 3 features, and added 2 attachments to the first feature, and 1 attachment to the second. I then deleted one specific attachment off each feature. The process is quickly thrown together, so it is missing all the checks and balances, like checking the httpcallers for errors (e.g. Esri always respond with http status 200 and provide the error as the response).

Cheers,

Todd

 

 


beetriz
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • Best Answer
  • July 9, 2024

Thanks Todd! This worked great!