Default value for Field. When field is localized accepts an object of default values with site locales as keys
The label of the field
Field API key
Whether the field needs to be multilanguage or not
Optional field validations
Field appearance details, plugin configuration and field add-ons
Ordering index
Type of input
Field hint
Fieldset linkage
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const fieldIdOrApiKey = 'blog_post::title';const field = await client.fields.update(fieldIdOrApiKey, {default_value: {en: 'A default value',it: 'Un valore di default'},label: 'Title',api_key: 'title',localized: true,validators: {required: {}},appearance: {editor: 'single_line',parameters: {heading: false},addons: [{id: '1234',field_extension: 'lorem_ipsum',parameters: {}}]},position: 1,field_type: 'string',hint: 'This field will be used as post title',fieldset: null});console.log(field);}run();
{id: '124',label: 'Title',field_type: 'string',localized: true,default_value: {en: 'A default value',it: 'Un valore di default'},api_key: 'title',hint: 'This field will be used as post title',validators: {required: {}},appearance: {editor: 'single_line',parameters: {heading: false},addons: [{id: '1234',field_extension: 'lorem_ipsum',parameters: {}}]},position: 1,item_type: {type: 'item_type',id: '44'},fieldset: null}