Skip to content

The project’s environment list, and what its runs report outside it

GET
/v1/environments
curl --request GET \
--url https://beta-api.plune.ai/v1/environments \
--header 'Authorization: Bearer <token>'

The environments (#1252, ADR 0071) — the options of the project’s system field, archived ones in place — each with «N runs · last …»: the live runs whose environment matches its name lower-cased and trimmed of spaces, tabs, carriage returns and line feeds (a no-break space is not trimmed). seen names the values the runs report that match none of them. A run takes any environment, listed or not; the run filters (GET /v1/runs?environment=, Analytics) still match the exact text. Runs in the Bin are not counted. Any member reads, a reader too. The system field is not one of /v1/custom-fields.

The list and the values seen

Media type application/json
object
environments
required

In the order they were added (after migration 0118, by the number of runs), the archived ones in place.

Array<object>

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
seen
required

Values the live runs report that match no environment of the list, archived ones included - under their most frequent spelling, the most recent first, at most 100.

Array<object>
<= 100 items
object
name
required
string
runs
required
integer
>= 1
lastRunAt
required
string format: date-time
Example
{
"environments": [
{
"id": "opt_5e1a9c07d2",
"name": "staging",
"archivedAt": null,
"runs": 48,
"lastRunAt": "2026-09-16T09:12:04.151Z"
}
],
"seen": [
{
"name": "qa-2",
"runs": 3,
"lastRunAt": "2026-09-16T09:12:04.151Z"
}
]
}

No / invalid token or session