Name of the build trigger
The type of build trigger
Wether Site Search is enabled or not. With Site Search, everytime the website is built, DatoCMS will respider it to get updated content
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
Additional settings for the build trigger. The value depends on the adapter
.
Wheter an automatic build request to webhook_url
should be made on scheduled publications/unpublishings
Unique token for the webhook (it's the same token present in webhook_url
)
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const buildTrigger = await client.buildTriggers.create({name: 'Custom build trigger',adapter: 'custom',indexing_enabled: true,frontend_url: 'https://www.mywebsite.com/',adapter_settings: {trigger_url: 'http://some-url.com/trigger',headers: {Authorization: 'Bearer abc123'},payload: {type: 'build_request'}},autotrigger_on_scheduled_publications: true});console.log(buildTrigger);}run();