Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record version

Retrieve a record version

Returns

Returns a resource object of type item_version

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const itemVersionId = "59JSonvYTCOUDz_b7_6hvA";
const itemVersion = await client.itemVersions.find(itemVersionId);
// Check the 'Returned output' tab for the result ☝️
console.log(itemVersion);
}
run();
{
id: "59JSonvYTCOUDz_b7_6hvA",
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",
},
meta: {
created_at: "2020-04-21T07:57:11.124Z",
is_published: true,
is_current: true,
},
item_type: { type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" },
item: { type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" },
editor: { type: "account", id: "312" },
}