Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Updated/Deleted Attachments from Archer Content Using API

SamratChowdhury
Contributor II

I am trying to get all content of an application and check in attachment exist and if it exist we are trying to delete it.

I do not see any API to delete attachment so the questing is as below:

==> Can i delete the attachment from a content  ?

==> What is the API available for it ?

==> In update content API, if i update attachment field value with blank will the attachment associated with it will be deleted ?

7 REPLIES 7

DavidPetty
Archer Employee
Archer Employee

Samrat, there's isn't per-say an API to delete an attachment.

 

What you would do is get the list of attachment IDs from the record, determine which attachment ID you no longer need and remove it from the original list of attachment IDs from the record.  Then update the record with the updated attachment IDs.

 

So, for example if you retrieve the contents of a record and it has the following attachment IDs; 1234,5231,3124,6421.  You've determined that the file for attachment ID 3214 is no longer needed.  You'd remove that ID from the list and update the records attachment field with the following IDs; 1234, 5231, 6421.  Then Archer back-end jobs will delete the file corresponding to 3214.

 Advisory Consultant

SamratChowdhury
Contributor II

Do we know, when Archer back-end jobs is scheduled to run ? David Petty

If it's the maintenance jobs, they typically run every Sunday morning.  Check the SQL Server Agent > Jobs to see if the schedule has changed.

 Advisory Consultant

Can you share the job name please.

Here you go Samrat,

sqljob.png

 

"ArcherLab" would be replaced with the name of your instance.

 Advisory Consultant

Again would this be also change the History of the attachments right?

Varghese are you talking about listing the change in the History Log (field)?  If so, no being the History Log field type doesn't track Attachment fields.

 Advisory Consultant