Is there any other idea or work around to know the status of an entry with a single call using Preview API? This sounds to me as it should be a core feature
What’s strange is the glaring omission of what most seem to consider to be pertinent metadata about content. I’ve given my team access to a “preview” environment wherein I was trying to tag draft and once-published-but-then-unpublished posts accordingly. Is this really an unfathomable use case for the Contentful engineers? I’m half considering adding my own damned “Post Status” field to the content model and having my users use that instead, but then I’m forfeiting functionality like scheduled publishes, etc.
There’s no reason that both the CDA and CPA can’t both just tell me what status an entity is in — in plain english. Is there some security concern? Do I need to switch my preview environment to use the CMA token instead, just for this? And then I still have to implement that weird-ass workaround to calculate the status myself? Is this not a CMS platform? Am I — are we — taking crazy pills? WHAT IS HAPPENING?!
Clearly there are use cases for this feature as expressed in this thread, so why you haven’t moved forward with it @charlie is beyond me.
You suggest some workarounds, but they all requires separate api calls. This has two immediate drawbacks
- Implementation of preview vs non-preview api will be very different
- It will affect the already very restrictive rate-limits on the contentful apis negatively
- CMA-tokens etc mentioned previously in this thread.
I have made a ton of validation to ensure our site doesn’t break when our content creators forget to publish a model that it e.g. referenced from another model that is published (e.g. an image, where instead of a src string, you’ll receive a metadata object). If the content creator looks at the site in preview mode, the image will be returned, and everything will look ok. In this situation, it would be nice to be able to indicate that the image isn’t published.