0

Is it possible to delete all entities in a collection using the shell? I need to refresh names of a very large collection and have a script that will accomplish this but I do need to delete them all first. Failing that, can I delete an app and start over?

Thanks!

MoreScratch
  • 2,933
  • 6
  • 34
  • 65
  • possible duplicate of [Apigee Usergrid: Mass delete option missing](http://stackoverflow.com/questions/25205880/apigee-usergrid-mass-delete-option-missing) – brandonscript Sep 15 '14 at 02:45

2 Answers2

0

You cannot delete all entities in a collection in one go, but you can select all entities on a page in the Admin Console and delete the selected entities. That is certainly faster than doing it individually, but for a really large collection, this may take some time.

Mike Malloy
  • 1,520
  • 1
  • 15
  • 19
0

This is the best way currently:

DELETE /yourcollectionname?select * where created > 0&limit=100

You can do the equivalent of this in the Data Explorer. Just fill out the query and the limit boxes.

Or, run this command via curl

We will have a better solution in the near future.

rockerston
  • 521
  • 2
  • 10
  • So I couldn't get this to work and resorted to creating a new App. I tried in the data explorer and just hangs. Is there a better way of achieving a delete yet? – MoreScratch Oct 16 '16 at 00:17