Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record

Validates an existing record field

Body parameters

id string Required

RFC 4122 UUID of record expressed in URL-safe base64 format

Example: "hWl-mnkWRYmMCSTq4z_piQ"
item_type Required

The record's model

creator Optional

The entity (account/collaborator/access token/sso user) who created the record

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const itemId = "hWl-mnkWRYmMCSTq4z_piQ";
await client.items.validateExisting(itemId, {
title: "My first blog post!",
content: "Lorem ipsum dolor sit amet...",
category: "24",
image: {
upload_id: "1235",
alt: "Alt text",
title: "Image title",
custom_data: {},
},
item_type: { type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" },
});
}
run();