Edit events via the python API

Hi there,
I wrote a python script to delete entries with sensitive data, but I am trying to make another one that edits the event/data/title field.
I can’t find a function in the API reference that does that, even though the web UI offers a functionality to edit the App and Title of any entry.
Is there a way to do that programmatically?

thank you

Hi, you need use insert_event method with the events unique id. This will replace the event. So you need to fetch the events, store it in a list. Iterate through the list inserting the events back to activitywatch with the redacted data.

Also consider joining the discord.

Great, that worked.
I just joined discord as well.
Thank you

2 Likes

I also want to joined this. Could you please guide me how can I join this?

Hi, you need a discord account. After creating it or if you already have one, just click this link to join.