Hello, what are the ways of identifying, when and by who, a collection has been deleted ?
Hi, when it is created/updated, you can see it in activity tab of collection.
Thank you, but how about deleted ?
Hmm not sure about deleted Let me confirm once and get back to you
Thankies
<:appwriteupvote:899677724615016528>
Hello @Victor1337 , 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
@Victor1337 if you can write a little more about your use case, we can come up with a pretty cool solution
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 ?
I can't tell you how the internals of appwrite work, I'll leave it to someone with more experience
unfortunately, the audit data is also deleted when the collection is deleted. You could create a feature request to somehow retain the audit data, though.
nice! but that probably doesn't tell you who did it, right? 🧐
you could also see if there's any HTTP Access logs that might give you some info too. if it's not enabled, you could try to enable them (on traefik)
@Steven , 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.
nice!
Also collection.delete is saved in audit table. Going trough the process seams to stay there, should it get deleted ?
Are there some better logs on the roadmap ?
it's not something worked on at the moment, if you want to see better audit logs for deleted collections, please make sure to create an issue
@Steven Yes sir, will crate a issue, this is how I found events of sort. But not the friendliest approach. Thankies
that's interesting...that should have been deleted 😅 This is the _<number>_audit table, right?
Right
Made this little guy -> https://github.com/appwrite/appwrite/issues/5262
Recommended threads
- How to bypass the rate limit on the back...
Once a month my app has a ton of usage and I always run into the Too many requests 429 error. I am trying to optimize the queues and jobs to manage that, but a...
- SSL certificate generation failed even t...
Hello, I have an Appwrite Site for which I added a custom domain. However, even though the domain is verified, the SSL certificate generation is failing. It is ...
- [Self-hosted] Realtime crashes with "Mis...