Show examples in:
    Retrieve a record version

    Returns

    Returns a item_version resource object.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const itemVersionId = '6542';
    const itemVersion = await client.itemVersions.find(itemVersionId);
    console.log(itemVersion);
    }
    run();
    Returned output:
    {
    id: '6542',
    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_valid: true,
    is_published: true,
    is_current: true
    },
    item_type: {
    type: 'item_type',
    id: '44'
    },
    item: {
    type: 'item',
    id: '4235'
    },
    editor: {
    type: 'account',
    id: '312'
    }
    }