Published or Draft?

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?!

/rant

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

  1. Implementation of preview vs non-preview api will be very different
  2. It will affect the already very restrictive rate-limits on the contentful apis negatively
  3. 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.