A site's deployments
const url = 'http://localhost:3000/api/v1/sites/example/deployments';const options = {method: 'GET', 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 GET \ --url http://localhost:3000/api/v1/sites/example/deployments \ --header 'Authorization: Bearer <token>'Newest first: where each is mounted, its state (checking, live, failed, replaced, held, preview), its files and why one failed or is held; a preview’s address.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Site id
Responses
Section titled “Responses”Deployments
object
object
Where it is mounted
External: an external site’s record of what it uses, no files
Held: it looks like phishing or malware and waits for whoever runs the server; its files are kept, not served. preview: a pull request’s build at its own address, never live
A preview’s name, such as pr-12; null for any other deployment
Where a preview answers: {name}–{site}.{PORTAL_DOMAIN}, at its mount. Given for previews only
Why it failed, or why it is held
What it uses of the project’s library, found in its files: its lineage
object
Copy: a file is the asset’s bytes; link: /a/{id}; current: /c/{id}, the version it served; declared: named by artbucket.site.json
The build’s file it was found in
The component versions it is built with, as its artbucket.site.json names them (artbucket site scan adds them for an external site)
What of it may no longer be shown, as the daily re-check of live builds last found: a license ended or a logo replaced since it deployed. Empty when all is well
Signs it looks like phishing or malware (a page asking for a password, a card or a recovery phrase; a program to download), one line each
When it was last checked
Example
{ "data": [ { "kind": "guidelines", "state": "checking", "uses": [ { "how": "copy" } ] } ]}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}