Topic by Howard Williams
Content
Hi,
We built up a backlog of file attachments, but we're at the point now where we want to bulk delete the existing backlog of files attached to incidents, and then to run a regular deletion process following that to delete any file attachment created more than xx days ago.
We can query the incident table, look to see if there are attachments, call up the information that way and delete as we go. The problem is that we have to look at every incident to see if it HAS an attachment.
The ideal method would be to directly query the FATTACH table, check the date, and delete the files that way.
The problem is that we don't appear to be able to query the FATTACH table directly - it returns an error message saying "no such table"
Example:
{
"type": "https://<sitename>.custhelp.com/services/rest/connect/exceptions/OSC-CREST-00019",
"title": "Invalid query parameter value",
"status": 400,
"detail": "This query is not supported: no such table: fattach",
"instance": "https://<sitename>.com/services/rest/connect/v1.3/queryResults/?query=select%20*%20from%20fattach%20LIMIT%20100",
"o:errorCode": "OSC-CREST-00019"
}
Can anybody point us in the right direction firstly for directly accessing the FATTACH table, and secondly running delete / destroy?
OSC May 16, using CREST in this instance
Thanks in advance!