Content Management API > Build trigger
Trigger a new site search spidering of the website
By default a spidering of the site is performed automatically at the end of a deploy. If you only need the spidering without a deploy, you can trigger it by calling this endpoint.
Examples
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const buildTriggerId = "1822"; await client.buildTriggers.reindex(buildTriggerId);}
run();