Skip to content

Restore an archived environment

POST
/v1/environments/{id}/restore
curl --request POST \
--url https://beta-api.plune.ai/v1/environments/example/restore \
--header 'Authorization: Bearer <token>'

The project owner’s. Live again, in the place it kept. Restoring a live one changes nothing.

id
required
string

The live environment

Media type application/json

An environment of the project’s list (#1252, ADR 0071): an option of its system field, whose name is the value a run carries in environment.

object
id
required

The option’s id: never changes and is never reused.

string
name
required
string
>= 1 characters <= 64 characters
archivedAt
required

Set while archived: one not to offer for new runs. The runs keep it, and a run that reports it is still taken.

string format: date-time
nullable
runs
required

The live runs of the project whose environment is this name lower-cased and trimmed of spaces, tabs, carriage returns and line feeds: «Staging» and «staging » count as one.

integer
lastRunAt
required

When the newest of those runs started.

string format: date-time
nullable
Example
{
"id": "opt_5e1a9c07d2",
"name": "staging",
"archivedAt": null,
"runs": 48,
"lastRunAt": "2026-09-16T09:12:04.151Z"
}

No / invalid token or session

You are in the project, but not as its owner

Media type application/json
object
error
required
string
Example
{
"error": "project owner only"
}

No such environment in the project

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over