Show examples in:
Javascript HTTP
Endpoint info
Available examples

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

1
PUT https://site-api.datocms.com/build-triggers/:build_trigger_id/reindex HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/build-triggers/:build_trigger_id/reindex' \
2
-X PUT \
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch(
2
"https://site-api.datocms.com/build-triggers/:build_trigger_id/reindex",
3
{
4
method: "PUT",
5
headers: {
6
Authorization: "Bearer YOUR-API-TOKEN",
7
Accept: "application/json",
8
"X-Api-Version": "3",
9
},
10
},
11
);