Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Content Management API > Record version

List all record versions

Query parameters

nestedboolean

For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs

pageobject

Parameters to control offset-based pagination

offsetinteger

The (zero-based) offset of the first entity returned in the collection (defaults to 0)

Example:200
limitinteger

The maximum number of entities to return (defaults to 15, maximum is 50)

Returns

Returns an array of resource objects of type item_version.

Examples

GET https://site-api.datocms.com/items/:item_id/versions 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/versions' \
\
-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/versions", {
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_version",
"id": "59JSonvYTCOUDz_b7_6hvA",
"attributes": {
"title": "My first blog post!",
"content": "Lorem ipsum dolor sit amet...",
"category": "24",
"image": {
"alt": "Alt text",
"title": "Image title",
"custom_data": {},
"focal_point": null,
"upload_id": "20042921"
}
},
"relationships": {
"item_type": {
"data": {
"type": "item_type",
"id": "DxMaW10UQiCmZcuuA-IkkA"
}
},
"item": {
"data": {
"type": "item",
"id": "hWl-mnkWRYmMCSTq4z_piQ"
}
},
"editor": {
"data": {
"type": "account",
"id": "312"
}
}
},
"meta": {
"created_at": "2020-04-21T07:57:11.124Z",
"is_published": true,
"published_from": "2020-04-21T07:57:11.124Z",
"published_until": "2020-04-21T07:57:11.124Z",
"is_current": true
}
}
],
"meta": {
"total_count": 20
}
}