Record what an external site uses
const url = 'http://localhost:3000/api/v1/sites/example/uses';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/uses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/zip' \ --data binaryFor a site of kind external, hosted elsewhere: its files as a zip (Content-Type: application/zip), read as a deployment’s are and not stored, and the components its artbucket.site.json names (components: addresses, or { component, fingerprint } to name the version whose code it has). Kept as the site’s live record: in lineage, in Fixes, and re-checked daily. problems says what of it may no longer be used. artbucket site scan does all of it from CI.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An external site’s id
Query Parameters
Section titled “Query Parameters”The commit scanned, when CI says
The branch or tag of that commit
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Recorded
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" }}