Not being able to do simple script (I'm a newbie)

I’m trying to run this to delete all entities in a database inside a space:

const fibery = context.getService('fibery');

for (const entity of args.currentEntities) { 
    await fibery.deleteEntity(entity.id, entity.id) 
}

I’m getting this error though (in console):

WebSocket connection to 'wss://matzu.fibery.io/api/online-users' failed: 
webSocket is closed before the connection is established.

Am I doing something wrong?

Will this work for you? It will delete all data in ALL DBs in a Space:

Otherwise you can use a Table View of your DB to select all entities with a single click, then delete them all via the Actions menu:

I don`t think so…

I want to do it with a script because I want to “sync” my calendar with fibery. In work we have kind like an outlook provider and the only thing I can get is the ics…

I want to delete all the entries from this “Calendar” space and then run through the ics to recreate (update) my calendar events…

The ics part is done, but I started creating the fibery part and can’t get to make it work…

Check your args to fibery.deleteEntity: