Skip to main content
PATCH
Update an environment

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.

tags
string[]

Tags selecting the tests to run (e.g. @smoke); a missing @ is added. A test runs when one of its tags contains any of them, so smoke also selects @smoke-nightly. A test title is not a tag: checkout flow matches no test. To run specific tests, use test_case_ids. Saved for runs in this environment; a trigger request that sends this field replaces it.

Minimum string length: 1
exclude_tags
string[]

Tags whose tests are skipped (e.g. @slow). Applied after every other selection, so it can only remove tests: with tags it runs tests matching tags but not exclude_tags; alone it runs every test except the excluded ones. Saved for runs in this environment; a trigger request that sends this field replaces it.

Minimum string length: 1
scheduled_trigger
string | null

Cron expression for scheduled triggers, or null.

scheduled_concurrency
object | null

Concurrency group and policy scheduled runs are triggered with. Omit to keep the current value; null to fall back to the project's legacy concurrency setting.

reporter_config
object

Reporter configuration for the environment. Slack channels (slack_channels or slack_channel_ids) must be active registered channels of the project's organization (GET /api/v2/slack/channels); they are stored as registered ids.

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

Glob patterns of the Playwright projects to run (e.g. chromium*). Empty means every project. Saved for runs in this environment; a trigger request that sends this field replaces it.

playwright_projects_ignore
string[]
required

Glob patterns of the Playwright projects to skip, applied after playwright_projects_match. Saved for runs in this environment; a trigger request that sends this field replaces it.

tags
string[]
required

Tags selecting the tests to run (e.g. @smoke); a missing @ is added. A test runs when one of its tags contains any of them, so smoke also selects @smoke-nightly. A test title is not a tag: checkout flow matches no test. To run specific tests, use test_case_ids. Saved for runs in this environment; a trigger request that sends this field replaces it.

exclude_tags
string[]
required

Tags whose tests are skipped (e.g. @slow). Applied after every other selection, so it can only remove tests: with tags it runs tests matching tags but not exclude_tags; alone it runs every test except the excluded ones. Saved for runs in this environment; a trigger request that sends this field replaces it.

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.

scheduled_concurrency
object | null
required

Concurrency group and policy scheduled runs are triggered with; null uses the project's legacy concurrency setting.

reporter_config
object
required

Reporter configuration for runs in this environment.

created_at
string | null
required

ISO 8601 timestamp.

updated_at
string | null
required

ISO 8601 timestamp.