Contentful logo

Contentful Community

Is there a way to retrieve the firstPublishAt date?

Hi,

i created a blog, and i want to be able to display the first publish at date, but so far i am only able to retrieve the createdAt date…

Is it possible in some kind of way to get the firstPublishAt date??

I see that in the JSON of an entry the property is there:

"publishedVersion": 187,
"firstPublishedAt": "2018-05-11T18:58:55.867Z",
"publishedAt": "2018-06-14T14:06:54.947Z"

}

but i dont know how to get it because it is not return into the entry object when making a request…

Thanks

Hi @olivier.castro-perri,

This is one the common resource attributes retrieved by our Content Management API, so you’d have to use it (instead of the CDA) in order to fetch this property:

https://www.contentful.com/developers/docs/references/content-management-api/#/introduction/common-resource-attributes