Show examples in:
    Restore an old record version

    Examples

    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const itemVersionId = '59JSonvYTCOUDz_b7_6hvA';
    const itemVersions = await client.itemVersions.restore(itemVersionId);
    itemVersions.forEach((itemVersion) => {
    console.log(itemVersion);
    });
    }
    run();