Choose your language:
    List all build triggers for a site
    Returns
    Returns an array of build_trigger objects.

    Examples

    Example code:
    const { SiteClient } = require('datocms-client');
    async function run() {
    const client = new SiteClient('YOUR-API-TOKEN');
    const buildTriggers = await client.buildTriggers.all();
    buildTriggers.forEach((buildTrigger) => {
    console.log(buildTrigger);
    });
    }
    run();
    Returned output:
    > node example.js
    {
    "id": "1822",
    "name": "Production",
    "adapter": "netlify",
    "adapterSettings": {
    "triggerUrl": "https://api.netlify.com/build_hooks/XXX",
    "siteId": "XXX",
    "branch": "master"
    },
    "lastBuildCompletedAt": "2017-03-30T09:29:14.872Z",
    "buildStatus": "success",
    "webhookToken": "xA1239ajsk123",
    "webhookUrl": "https://webhooks.datocoms.com/xA1239ajsk123/deploy-results",
    "indexingStatus": "success",
    "frontendUrl": "https://www.mywebsite.com/",
    "autotriggerOnScheduledPublications": true,
    "indexingEnabled": true
    }