Skip to main content
PATCH
/
api
/
environments
/
{id}
Update an environment
curl --request PATCH \
  --url https://api.empirical.run/api/environments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "is_disabled": true,
  "playwright_projects_match": [
    "<string>"
  ],
  "playwright_projects_ignore": [
    "<string>"
  ],
  "scheduled_trigger": "<string>"
}
'
{
  "id": 123,
  "project_id": 123,
  "slug": "<string>",
  "name": "<string>",
  "playwright_projects_match": [
    "<string>"
  ],
  "playwright_projects_ignore": [
    "<string>"
  ],
  "is_disabled": true,
  "env_files": [
    "<string>"
  ],
  "scheduled_trigger": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Environment ID.

Required range: x >= 1

Body

application/json
name
string

Display name.

slug
string

URL-friendly identifier.

is_disabled
boolean

Whether the environment is disabled.

playwright_projects_match
string[]

Playwright project names to include. Items must not start with '!'.

playwright_projects_ignore
string[]

Playwright project names to exclude.

scheduled_trigger
string | null

Cron expression for scheduled triggers, or null.

Response

The updated environment row (no data envelope).

id
number
required

Unique identifier.

project_id
number
required

Project identifier.

slug
string
required

URL-friendly identifier.

name
string
required

Display name.

playwright_projects_match
string[]
required

Playwright project names to match.

playwright_projects_ignore
string[]
required

Playwright project names to ignore.

is_disabled
boolean | null
required

Whether the environment is disabled.

env_files
string[]
required

Environment file paths.

scheduled_trigger
string | null
required

Cron expression for scheduled triggers.

created_at
string | null
required

ISO 8601 timestamp.

updated_at
string | null
required

ISO 8601 timestamp.