Start a new topic
Answered

List of all collections and all fields

Hi! 


I couldn't find an answer anywhere and I also can't think of a workaround for this problem.


Is it possible to get a list of all collections in my app? 


Is it possible to get a list of all fields in in a specific collection? (Parsing the resulting JSON doesn't work if the collection has no entries).



Thanks a lot! 



Best Answer
Hi, it is not currently possible to get a list of collections in your app through the API, only through the console.

As for your second question: since we use a schema-less database, there is no guarantee that all objects in the collection have the same fields, and thus there is no consistent list of fields that is available per collection. One way to achieve this type of listing yourself is to fetch a number of entities (for example, the first and the last one) from your collection, and then inspect them to compile an approximate list of collection fields.

No worries at all, please let me know if you have any other issues.


Enjoy your afternoon

Thank you very much for your help!

Answer
Hi, it is not currently possible to get a list of collections in your app through the API, only through the console.

As for your second question: since we use a schema-less database, there is no guarantee that all objects in the collection have the same fields, and thus there is no consistent list of fields that is available per collection. One way to achieve this type of listing yourself is to fetch a number of entities (for example, the first and the last one) from your collection, and then inspect them to compile an approximate list of collection fields.
Login or Signup to post a comment