How to delete specified workspace with action script?

Hi there, I am wondering if it is possible to delete a specific workspace using javascript. I didn’t see any function like workspace.delete(). There is only workspace.create().

You are correct, but it is possible to create a temporary workspace. You can create and use a workspace without calling update(), which will mean the workspace is not saved. Hopefully, you were only wanting to delete a workspace as you wanted to create and use one just for the action.

Thank you for replying! This is not exactly what i want but i think i can work around this by not updating the workspace and create an action for switching between workspaces.

Could you explain what you are trying to do? Workspaces tend to be stable, user-configured items in the system, not something you want to delete often.

I want to use workspaces as filter for my project notes. Basically, i want workspaces for my projects. After i done with my projects I created a action to archive these notes and delete the workspaces