Choose your language:
    Delete a build trigger
    Returns
    Returns a build_trigger object.

    Examples

    Example code:
    const SiteClient = require('datocms-client').SiteClient;
    const client = new SiteClient('YOUR-API-TOKEN');
    const buildTriggerId = '1822';
    client.buildTrigger.destroy(buildTriggerId)
    .then((buildTrigger) => {
    console.log(buildTrigger);
    })
    .catch((error) => {
    console.error(error);
    });
    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
    }