0

Once again an usergrid question. Something that I cant find in the docu. How do I delete a collection? Not the entities in the collection. But the collection itself. As per Apigee's ReSTful guideline webinar, I understand that collection name should always be plural.

I have a collection called showroom, but I want to call it showrooms. Would like to delete collection showroom and create showrooms.

lonelymo
  • 3,972
  • 6
  • 28
  • 36

2 Answers2

2

Unfortunately deleting collections is not currently supported for Apigee API BaaS.

brandonscript
  • 68,675
  • 32
  • 163
  • 220
0

I ran up against this too and seems to be a common question. I did find a gist that helps delete collections in batches of 10 by deleting one at a time.

https://gist.github.com/r3mus/11704dc5b7395108c205

In addition, if found that if you do something like

DELETE http://xxxxx.com/appservices/xxxxx/collection?ql=select * where isError = false

It will delete up to 1k entities at a time. This approach works if you want to run it using a cursor to remove till empty.

klevak
  • 63
  • 4
  • that deletes entities, not collections. There seems to be no way to get rid of a collection entirely. I don't want to delete the rows of a table, I want to delete the table itself - that's the issue here – lonelymo Aug 16 '14 at 14:37
  • Your right. This does seem to be a common question for those first getting started. – klevak Aug 16 '14 at 15:22