Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record

Retrieve information regarding changes between current and published versions of the record

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.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Terminal window
curl -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 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-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
}
},
"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"
}
}
}
}
]
}