Deploy to a site
const url = 'http://localhost:3000/api/v1/sites/example/deployments?kind=guidelines';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/zip'}, body: 'binary'};
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/deployments?kind=guidelines' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/zip' \ --data binaryThe body is a zip of static files (Content-Type: application/zip): a built site with index.html at its root, or in the one folder it wraps. It is unpacked, checked and stored, then live at path, the deployment there before kept as replaced. A brand portal’s root is drawn by Artbucket: mount a build beside it, at a path such as /docs. When the zip holds artbucket.site.json, every asset it names is checked too. Every file is matched against the project’s library, by its bytes and by the /a/ and /c/ addresses in its HTML, CSS and JS: a copy or a pinned link of a replaced, unapproved or expired asset fails the deployment, naming the file and the replacement. Served on the site’s own address only.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Site id
Query Parameters
Section titled “Query Parameters”Where it is mounted: / (the default) or a path such as /docs
What it is; the site’s own kind when left out
The commit it was built from, when a build says
The branch or tag of that commit
A preview’s name, such as pr-12: the build is checked as any deployment is, then served at {name}–{site}.{PORTAL_DOMAIN} behind the site’s own door, never live. A later build of the same preview replaces it; previews go 30 days after they were made
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”The deployment
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" }}