Is it possible to query the Collection-Types of strapi

Is it possible to query the Collection-Types of strapi


2

Is it possible to query a list of Collection-Types in Strapi?

The following example:

I have three Collection-Types:

  • Restaurant
  • Stores
  • Events

The client application does not know which Collection-Types exist and I want to query them dynamically:

Example response

{
    contentTypes: [
        {
            name: "Restaurant"
        },
        {
            name: "Stores"
        },
        {
            name: "Events"
        }
    ]
}

Is this possible with Strapi? Thanks!

5

  • Did you ever figure out how to do this?

    – Ashe Abbott DiBlasi

    Oct 5, 2022 at 17:52

  • @AsheAbbottDiBlasi Unfortunately not. 🙁 Have you had any luck?

    – Laurence Trippen

    Jan 10 at 12:20

  • I didn't have any luck. We ended up building our own solution with React instead of using Strapi.

    – Ashe Abbott DiBlasi

    Jan 10 at 17:31

  • @AsheAbbottDiBlasi We also had to write our own solution with React & Express.js. LOL. Good luck with your project!

    – Laurence Trippen

    Jan 10 at 19:03


  • Good luck to you, too!

    – Ashe Abbott DiBlasi

    Jan 11 at 1:00

1 Answer
1


0

Maybe we can create a collection to store all other collection-type names.

New contributor

mozi tong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



Leave a Reply

Your email address will not be published. Required fields are marked *