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: "https://www.mywebsite.com/"

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":"http://some-url.com/trigger","headers":{"Authorization":"Bearer abc123"},"payload":{"type":"build_request"}}

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

Returns

Returns a build_trigger resource object.

Examples

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, {});
console.log(buildTrigger);
}
run();