Returns a resource object of type item_version
1import { buildClient } from "@datocms/cma-client-node";2 3async function run() {4 const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });5 6 const itemVersionId = "59JSonvYTCOUDz_b7_6hvA";7 8 const itemVersion = await client.itemVersions.find(itemVersionId);9 10 // Check the 'Returned output' tab for the result ☝️11 console.log(itemVersion);12}13 14run();
1{2 id: "59JSonvYTCOUDz_b7_6hvA",3 title: "My first blog post!",4 content: "Lorem ipsum dolor sit amet...",5 category: "24",6 image: {7 alt: "Alt text",8 title: "Image title",9 custom_data: {},10 focal_point: null,11 upload_id: "20042921",12 },13 meta: {14 created_at: "2020-04-21T07:57:11.124Z",15 is_published: true,16 is_current: true,17 },18 item_type: { type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" },19 item: { type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" },20 editor: { type: "account", id: "312" },21}