Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Build trigger

Update build trigger

Body parameters

name string Optional

Name of the build trigger

Example: "Custom build trigger"
adapter enum Optional

The type of build trigger

Example: "custom"
custom Optional

adapter_settings must include the following properties: trigger_url, headers and payload.

netlify Optional

adapter_settings must include the following properties: trigger_url, access_token, branch, site_id

vercel Optional

adapter_settings must include the following properties: project_id, token, branch, team_id, deploy_hook_url

circle_ci Optional

adapter_settings must include the following properties: project, token, revision, vcs, build_parameters

gitlab Optional

adapter_settings must include the following properties: trigger_url, token, ref, build_parameters

travis Optional

adapter_settings must include the following properties: api_token, repo, branch, config

indexing_enabled boolean Optional

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 string, null Optional

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

Example: "https://www.mywebsite.com/"
autotrigger_on_scheduled_publications boolean Optional

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

adapter_settings object Optional

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

Example: { trigger_url: "http://some-url.com/trigger", headers: { Authorization: "Bearer abc123" }, payload: { type: "build_request" }, }

Returns

Returns a resource object of type build_trigger

Examples

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const buildTriggerId = "1822";
7
8
const buildTrigger = await client.buildTriggers.update(buildTriggerId, {
9
id: "1822",
10
});
11
12
// Check the 'Returned output' tab for the result ☝️
13
console.log(buildTrigger);
14
}
15
16
run();
1
{
2
id: "1822",
3
name: "Custom build trigger",
4
adapter: "custom",
5
adapter_settings: {
6
trigger_url: "http://some-url.com/trigger",
7
headers: { Authorization: "Bearer abc123" },
8
payload: { type: "build_request" },
9
},
10
last_build_completed_at: "2017-03-30T09:29:14.872Z",
11
build_status: "success",
12
webhook_url: "https://webhooks.datocoms.com/xA1239ajsk123/deploy-results",
13
indexing_status: "success",
14
frontend_url: "https://www.mywebsite.com/",
15
indexing_enabled: true,
16
autotrigger_on_scheduled_publications: true,
17
}