Bulk Delete Variables — Designer API

Hey, is there an endpoint to get all variables in the default collection and or a workaround? I want to delete all the Variables programmatically, but I need the variable ID to delete them.

Have you found a way to get a list of all variables in the default collection?

const collection = webflow.getDefaultVariableCollection()
const variable = collection.getVariableByName(‘Space Cadet’) → seems like the only way to get a variable…

You could try something like this:

const collection = await webflow.getDefaultVariableCollection();
const variables = await collection.getAllVariables();

That should give you the ID’s for all the variables if I recall.

You may then want to variable.getName(); for each ID if needed.
You could also use variable.get() for the details of the variable.