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
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...