Reputation: 1
When our keen.io project was started, there were a bunch (hundreds?) of event collections accidentally created due to the names being changed dynamically (i.e. viewed page blog name X, viewed page blog Y, viewed page blog Z, etc). Does anyone know of an efficient way to delete all these collections (i.e. that does not involve deleting them one by one in the UI or via API)?
If I was able to query all the event collection names we have in our project, then I could easily loop through all the event collections and delete via the API, but I haven't found a way to get the event collection list back in a query.
Upvotes: 0
Views: 628
Reputation: 510
Issuing a GET request to the Events resource returns schema information for all the event collections in a project, including properties and their types.
https://keen.io/docs/api/reference/#event-resource
keen-gem has an event_collections method that wraps this functionality if you're into Ruby.
It's best to loop through the schema one collection at a time as deleting many collections in parallel can lead to rate limiting.
Upvotes: 2