How to ask Primic for all existing document types?

I will use a Svelte SSG called Elder.js to build my site by my question is more general.

It seems that there is no way to query Prismic to get all existing document types. I would like to fetch such a list so that I can select what I want to retrieve later. Is that possible ?

For example, even if my frontend does not know how to deal with a new type I've just created on Prismic, I could just use a default template. It would not be optimal from a UI standpoint but the content can be available faster.

Hi Tristan,

Welcome to the community!

You can do this simply by hitting the CDN route like so:
https://sample-site.cdn.prismic.io/api/v2

There'll you see an object call Types.

Thanks.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.