Check a build hosted anywhere
const url = 'http://localhost:3000/api/v1/sites/check';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/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/zip' \ --data binaryThe body is a zip of a built site (Content-Type: application/zip), from a CI job that deploys it somewhere else: Vercel, Netlify, GitHub Pages. It is checked as a deployment would be, and nothing is stored: every file matched against the project’s library by its bytes, every /a/ and /c/ address in its HTML, CSS and JS read, and the ids artbucket.site.json names. allowed is false when any of it may not be shown, with the reasons in problems.
Scope: read.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”The verdict
object
object
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
Why what it uses may not be shown, each naming the file and, for a replaced asset, its replacement
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
Example
{ "data": { "uses": [ { "how": "copy" } ] }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}