Contentful logo

Contentful Community

SystemProperties.Status always returning Null

I am retrieving entries and looking at the SystemProperties of that entry. I am receiving values for ID and Version but Status is always Null.

I’m attempting to get this status so I know if the entry is Draft or Published.

Is there any other way to find this out if not this way?

Thanks.

Hi @jk123, which API and SDK are you using? Could you also explain a bit more about the use case? as generally CDA is used for retrieving published entries and CPA for draft ones.

Hi @jk123

The Status property is only applicable to upload resources. To find out if an entry is in draft or published you’d have to do something similar to what we do in the .NET example app:

It’s extremely clunky and annoying. The bottom line is that the CDA/CPA simply do not expose a good way to know the status of an entry. If you’re using the CMA you can look at the PublishedVersion property and compare this to the Version and Revision fields to figure out whether the latest version of the entry is published or not.

Hi @robert

Thanks for getting back to me with a solution, much appreciated.