As above. I know how to create/edit/delete an existing collection but need guidance in the creation of a new collection via a REST service.
Thanks.
As above. I know how to create/edit/delete an existing collection but need guidance in the creation of a new collection via a REST service.
Thanks.
Hello! Tiggzi DB is based on Mongo DB, so you can use this docs https://support.mongolab.com/entries/... (see Create collection section). Hope this will help.
Hello! It's not possible.
Hi Marina,
Why is this not possible?
Saw the below from Mongo DB which suggests that this should be possible. I created a POST REST service in Tiggzi using the logic below. It did not work but that could be due to some syntax error.
Thanks...
---------------------------------- From Mongo DB ----------------------------------------------
Create collection
To create a new collection, just start using it! Just like using a standard driver or the shell, collections are created implicitly just by using them. As soon as you POST your first document you should see the collection appear.
Ok, thank's for an update and sorry for this misunderstanding:)
Let me add this.
If your question was whether you can make a POST request to a Tiggzi database - absolutely yes. If your question was whether you can create a new collection by sending a POST request - then the answer is no. Although MongoDB does allows that - our API doesn't allow it to minimize errors. It would very easy to send the wrong collection name or the wrong field name in the POST.
Max, while I understand your logic, it seems that this restriction limits the flexibility of the app to cater to different needs.
Take my requirement as an example. I need to be able to create a new collection via a REST service whenever a user creates a new "record/entry" using the app. That's because other users can view this record/entry and in the process, like/dislike and post comments. These likes/dislikes as well as comments to be tagged to the users who posted them.
Anyway, looks like I either have to find a non-Tiggzi database to use or try to find an alternative solution to meet this requirement if I continue using the Tiggzi database. If you have any Database 101 readings to recommend, I'll appreciate that as well. Thanks for hearing my feedback and providing your support.
Could you create the collection up front?
That was my earliest idea. However, it will not work as users need to be able to create new entries/records on the fly.
Well, you can still create new entries/records, you would just need to create the actual collection first.