Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Build trigger

List all build triggers for a site

Returns

Returns an array of resource objects of type build_trigger

Examples

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