// Lifecycles

Upsert phase environment

Attach an environment to a phase or change its trigger mode.

PUT/api/lifecycle/phase/environment

Description

Adds an environment to a phase if not already present, otherwise updates its howToTrigger mode.

Parameters

NameInTypeRequiredDescription
lifecycleId body string yes ID of the lifecycle.
phaseId body string yes ID of the phase.
environmentId body string yes ID of the environment.
howToTrigger body string no Automatic, Manual, or RequiresApproval. Defaults to Manual.

Errors

StatusMeaning
400 Invalid IDs or environment not in the workspace.
401 Missing or invalid Basic auth credentials, or the service account lacks the required role.