Show examples in:
Update build trigger

Body Parameters

name  Optional  string  Example: "Custom build trigger"

Name of the build trigger

adapter  Optional  enum  Example: "custom"

The type of build trigger

indexing_enabled  Optional  boolean  Example: true

Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content

frontend_url  Optional  string, null  Example: ""

The public URL of the frontend. If Site Search is enabled (indicated by indexing_enabled), this is the starting point from which the website's spidering will start

autotrigger_on_scheduled_publications  Optional  boolean  Example: true

Wheter an automatic build request to webhook_url should be made on scheduled publications/unpublishings

adapter_settings  Optional  object  Example: {"trigger_url":"","headers":{"Authorization":"Bearer abc123"},"payload":{"type":"build_request"}}

Additional settings for the build trigger. The value depends on the adapter.


Returns a build_trigger resource object.


Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const buildTriggerId = '1822';
const buildTrigger = await client.buildTriggers.update(buildTriggerId, {});