#Identify when and by who a collection has been deleted.

1 messages · Page 1 of 1 (latest)

ivory sluice
#

Hello, what are the ways of identifying, when and by who, a collection has been deleted ?

dawn field
#

Hi, when it is created/updated, you can see it in activity tab of collection.

ivory sluice
dawn field
#

Hmm not sure about deleted Let me confirm once and get back to you

ivory sluice
#

Thankies

ivory sluice
cunning rock
#

Hello @ivory sluice , you can use appwrite events and trigger some function.
databases.*.collections.*.delete

#

if it is a specific collection:
databases.*.collections.my-collection.delete
here is a list of all events:
https://appwrite.io/docs/events

Appwrite

Appwrite provides web and mobile developers with a set of easy-to-use and integrate REST APIs to manage their core backend needs.

#

@ivory sluice if you can write a little more about your use case, we can come up with a pretty cool solution

ivory sluice
#

In the meantime I connected to mariaDb underlying container, and found some info in the audit table. Does that incorporate all events ? Of type collection delete ?

cunning rock
#

I can't tell you how the internals of appwrite work, I'll leave it to someone with more experience

hollow basin
hollow basin
hollow basin
ivory sluice
#

@hollow basin , I did manage to track that down, but the process was painful. And I don't feel is right, the reason I managed was based on time event logs from docker, annexed with ip. But not provided by appwrite structure.

ivory sluice
#

Also collection.delete is saved in audit table. Going trough the process seams to stay there, should it get deleted ?

ivory sluice
hollow basin
ivory sluice
#

@hollow basin Yes sir, will crate a issue, this is how I found events of sort. But not the friendliest approach. Thankies

hollow basin
ivory sluice
#

Right