Use API to delete entire file attachment history

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • In Progress
  • (Edited)
This question is a follow-up to: https://community.quickbase.com/quickbase/topics/delete-file-attachment-with-api-editrecord. It concerns the use of API_EditRecord to delete attached files from
records. Inspired by the final answer to the aforementioned question, I have been sending out requests with these parameters:

<rid>[rid]</rid>
<field fid="18" filename="delete"></field>
<field fid="24" filename="delete"></field>

This works perfectly well, except for not actually deleting any files. What I get are empty fields whose revision histories now have "(deleted by user)" at the top, with all previous revisions still available and taking up space.

Is there really no way of actually deleting file attachments through the API? While I would prefer a nuke-all option of removing the entire history at once, I'm also open to doing it revision by revision. I looked at the API reference and couldn't find anything, so I'm nervous that this is just not possible, but I thought I'd ask just to be safe.


Photo of Steffen

Steffen

  • 90 Points 75 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,486 Points 50k badge 2x thumb
I have not tested at all, but looking at Dan's original post he had the line

&delfile_fid_9=1

I don’t see you using that syntax anywhere.
Photo of Steffen

Steffen

  • 90 Points 75 badge 2x thumb
I thought the filename="delete" attribute was the XML equivalent of that, but maybe not. I'll try the URL approach instead and see if it makes a difference.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,486 Points 50k badge 2x thumb
The Oracle seemed to be saying that you need both

&_fid_9=

&delfile_fid_9=1
Photo of Steffen

Steffen

  • 90 Points 75 badge 2x thumb
Tried that just now, but it makes no difference.