Content Management API > Record
Retrieve information regarding changes between current and published versions of the record
Warning: Experimental API
Please note that this API method is marked as unstable and should be avoided in production environments. Changes may occur at any time without warning, potentially impacting your scripts. We recommend contacting our Support Team to explore alternative approaches that are safer and more reliable!
Returns
Returns a resource object of type item_current_vs_published_state.
Examples
GET https://site-api.datocms.com/items/:item_id/current-vs-published-state HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3curl -g 'https://site-api.datocms.com/items/:item_id/current-vs-published-state' \ \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3"await fetch( "https://site-api.datocms.com/items/:item_id/current-vs-published-state", { headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", }, },);HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "item_current_vs_published_state", "id": "EnO-NF5wRy6K-cxGt1doqg", "relationships": { "scheduled_publication": { "data": { "type": "scheduled_publication", "id": "34" } }, "scheduled_unpublishing": { "data": { "type": "scheduled_unpublishing", "id": "34" } }, "published_version": { "data": { "type": "item_version", "id": "59JSonvYTCOUDz_b7_6hvA" } } }, "attributes": { "current_version_locales": [ "" ], "published_version_locales": [ "" ], "changed_locales": [ "" ], "added_locales": [ "" ], "removed_locales": [ "" ], "non_localized_fields_changed": true, "current_version_invalid_locales": [ "" ], "current_version_non_localized_fields_invalid": true } }, "included": [ { "type": "scheduled_publication", "id": "34", "attributes": { "publication_scheduled_at": "2025-02-10T11:03:42Z", "selective_publication": { "content_in_locales": [ "en" ], "non_localized_content": true } }, "relationships": { "item": { "data": { "type": "item", "id": "hWl-mnkWRYmMCSTq4z_piQ" } } } } ]}