Build a site again
POST
/api/v1/sites/{id}/rebuild
const url = 'http://localhost:3000/api/v1/sites/example/rebuild';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/sites/example/rebuild \ --header 'Authorization: Bearer <token>'Calls the site’s deploy hook now, as a release does, with event: "site.rebuild": for a build that still names an older component (Fixes). status is what the hook answered; a site without a hook is refused (422).
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Site id
Responses
Section titled “Responses”What the hook answered
Media typeapplication/json
object
data
required
object
status
required
string
Examplegenerated
{ "data": { "status": "example" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}