Skip to content

Restore a deployment

POST
/api/v1/sites/{id}/deployments/{deployment}/restore
curl --request POST \
--url http://localhost:3000/api/v1/sites/example/deployments/example/restore \
--header 'Authorization: Bearer <token>'

A replaced deployment live again at its path, the one live there now replaced in turn: undoing a bad deploy without building again. Not a failed one.

Scope: write.

id
required
string

Site id

deployment
required
string

Deployment id

The deployment, live

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
path
required

Where it is mounted

string
kind
required

External: an external site’s record of what it uses, no files

string
Allowed values: guidelines landing docs storybook external
state
required

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

string
Allowed values: checking live failed replaced held preview
preview
required

A preview’s name, such as pr-12; null for any other deployment

string | null
url

Where a preview answers: {name}–{site}.{PORTAL_DOMAIN}, at its mount. Given for previews only

string | null
files
required
integer
>= -9007199254740991 <= 9007199254740991
bytes
required
integer
>= -9007199254740991 <= 9007199254740991
commit
required
string | null
ref
required
string | null
error
required

Why it failed, or why it is held

string | null
manifest
required
Any of:
object
key
additional properties
uses
required

What it uses of the project’s library, found in its files: its lineage

Array<object>
object
asset
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
how
required

Copy: a file is the asset’s bytes; link: /a/{id}; current: /c/{id}, the version it served; declared: named by artbucket.site.json

string
Allowed values: copy link current declared
file
required

The build’s file it was found in

string | null
componentUses
required

The component versions it is built with, as its artbucket.site.json names them (artbucket site scan adds them for an external site)

Array<string>
problems
required

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

Array<string>
flags
required

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

Array<string>
checkedAt
required

When it was last checked

string | null
createdBy
required
string
createdAt
required
string
Example
{
"data": {
"kind": "guidelines",
"state": "checking",
"uses": [
{
"how": "copy"
}
]
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}